Excel 2007 VBA Find Last

Solved/Closed
Tjones4852 Posts 11 Registration date Monday May 10, 2010 Status Member Last seen December 9, 2011 - May 10, 2010 at 04:48 PM
rizvisa1 Posts 4479 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - May 10, 2010 at 06:26 PM
I have a mutipage workbook where I am coping information from three sheets and consolidating the information to another sheet so I can export into a csv file. Some of the rows in the individual sheets may be blank when they are copied and must remain so on the base sheet.

Once I get all the data on the consolidation sheet I remove all the blank rows.

My problem is when I go to paste the data to my consolidation sheet I need to select the next empty cell in column A and some of the values in A may be null or 0. So I am attempting to look from the bottom up instead of the top down.

All the data is variable in length.

1 reply

rizvisa1 Posts 4479 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 768
May 10, 2010 at 06:26 PM
If col A always has some data you can use this

lMaxRows = Cells(Rows.Count, "A").end(xlUp).row
0