View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Die_Another_Day Die_Another_Day is offline
external usenet poster
 
Posts: 644
Default Next available row

lastRow = Sheets("Sheet2").Range("A" &
Sheets("Sheet2").Rows.Count).End(xlUp)

Note: the Sheets("Sheet2") in front of the Rows.Count is only needed if
the ActiveSheet is not a "Worksheet", i.e. a stand alone Chart. (I
found this out the hard way:)

Charles Chickering

Sandy wrote:
I have a workbook with 6 worksheets - all the worksheets are related to the
same part numbers but each contains different information. The number of rows
on each worsheet varies based on the data requirements. Each data table
begins at cell A1 on the respective sheet.

I import a file to update these data on the various sheets but sometimes I
encounter a new part number that needs to be added to one or more sheets.
Presently I go to each sheet to get the row count so I know where the next
empty row is.

Is there another way to do this without going to each sheet?

Thanks