Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding row number at the bottom of a block of data
Hi - Essentially I need to find how many records in a worksheet.
I can do Sub test1() Sheets("Data").Select Range("A1").Select Selection.End(xlDown).Select End Sub Which taked me to the end of the block of data, but how do I: a) Find the rownumber the curser stopped at? b) put the cell address into a cell on a refernce sheet? Any ideas? Thanks Andrew |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding row number at the bottom of a block of data
To avoid stopping at a gap in the data it's usually better to start at the bottom....
dim r as range set r=sheet1.cells(sheet1.rows.count,1).end(xlup) then you can use r.row r.address -- Tim Williams Palo Alto, CA "Andreww" wrote in message ps.com... Hi - Essentially I need to find how many records in a worksheet. I can do Sub test1() Sheets("Data").Select Range("A1").Select Selection.End(xlDown).Select End Sub Which taked me to the end of the block of data, but how do I: a) Find the rownumber the curser stopped at? b) put the cell address into a cell on a refernce sheet? Any ideas? Thanks Andrew |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding row number at the bottom of a block of data
Splendid!
I'll try it in the morning. Regards Andrew |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding Number Within Range Then Copying Data Below Number to Cells | Excel Programming | |||
Finding the bottom non-blank cell in a range | Excel Discussion (Misc queries) | |||
finding next empty row from bottom up!! | Excel Programming | |||
finding next empty row from bottom up!! | Excel Programming | |||
Finding Bottom of Sheet | Excel Worksheet Functions |