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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2000 - Macro to Find Varying # of Rows

Status
Not open for further replies.

Jillp

Technical User
Jun 7, 2001
75
US
I am a macro novice, and use the macro recorder, but sometimes do small edits in the editor.

I have used the Macro recorder to format a report that we run weekly from a database. My problem is each week the # of rows will be different. How can I tell my macro to go to the last row?

TIA for any help,

Jill
 
Sense you asked the question here:

If Worksheets("Sheet1").Range("A2").Value <> "" Then
intLstRow = ActiveSheet.Range("A1").CurrentRegion.Rows.Count
End If

is something I use. You will need to change it to fit your needs. This is assuming that there are no blank cells in column A. You will also need to declare intLstRow.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top