We help IT Professionals succeed at work.

count number of "used" rows trick with vba - can't remember

what is the vba code that actual goes to the bottom of the workbook and works its way back up to count the number of used rows.  for instance you have a value in a1 and a5 and the code will return a count of 5 by going to the bottom and then working its way back up.
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2011
Commented:
activesheet.range("A" & activesheet.rows.count).end(xlup).row


xlup is -4162 if calling from VBS rather than excel VBA

Chris

Author

Commented:
Perfect

Explore More ContentExplore courses, solutions, and other research materials related to this topic.