Macro to count the number of text strings in sheet in Excel 2003

-1

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.

Jason Lynch

Posted 2012-12-15T05:15:47.537

Reputation: 1

Answers

0

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

MarioTheHedgehog

Posted 2012-12-15T05:15:47.537

Reputation: 27