Last Cell
You can always find the last row with
lastrow = Cells(Rows.Count, 1).End(xlUp).Row
where Count, 1 is the longest column with data. this assums A or column 1.
If another column has more rows populated, use that column - if it is "C"
then use 3 etc.
Glen
"Steve W" wrote in message
...
Hi,
If you press CTRL+End the cursor goes to the last cell in the worksheet.
You can also find the same cell in VBA using
SpecialCells(xlCellTypeLastCell)
When you delete contents of cells or whole rows/columns, the address of
the last cell doesn't change immediately, but it will recalculate it
automatically - eventually.
My question is, how can I speed up this recalculation process, or cause it
to re-find the real last cell right away? And is there a method I can use
in VBA and directly in the spreadsheet?
By the way, this applies to Excel 2000 and 2002, maybe others as well.
Thanks in advance for your help!
S
|