Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a worksheet for scoring.

I have a list in the first sheet that will be for data entry starting with a2 and going down the sheet, this is for Player names.

I have a summary sheet named "Place" that has a formula for pulling data.

I would like a macro to count the number of text strings in sheet "Setup" from A2 to whatever and then fill down sheet "Place" the correct number of times.

share|improve this question
add comment

1 Answer 1

You could use something like

StringCount = 0

For i = 2 to range("A2").end(xldown).row 'assuming no breaks in data

If Typename(cells(i, 1).value) = "String" Then StringCount = StringCount + 1

Next i

This essentially gives you the number of strings in column A

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.