Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .