Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select rows using variable in second position

Status
Not open for further replies.

dar149

MIS
Mar 5, 2002
117
US
I am counting how many rows in a specific column contain data. Other columns may contain additional data, but I don't care about those rows, so I can't look for the end of a list. I am capturing the number of rows in a variable, say X. I am using the following code:
ActiveCell.Rows("1:X").EntireRow.Select. I get a type mismatch. Any suggestions?
 
ActiveCell.Rows("1:X").EntireRow.Select
makes no sense
For a start, the activecell can only have the singular ROW as a property
you need to use
Rows("1:" & X ).entirerow.select Rgds
~Geoff~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top