Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to find first and last cell in a Sheet with an entry
Hallo, friends!
Is there a short way to find the first (last) row(column) that contains an entry? Please give me a hint! Thanks Otto |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to find first and last cell in a Sheet with an entry
Otto,
Last row Range("A1").End(xlDown).Row If there might be empty cells in that range, then use Cells(Rows.Count,"A").End(xlUp).Row Similarly for columns Range("A1").End(xlToRight).Column or Cells(1,Columns.Count).End(xlToLeft).Column -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Hölzl Otto" wrote in message ... Hallo, friends! Is there a short way to find the first (last) row(column) that contains an entry? Please give me a hint! Thanks Otto |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to find first and last cell in a Sheet with an entry
dim lastcell as range
set lastcell = Range("A65536").end(xlup) msgbox "Last row is " & lastcell.row msgbox "Last column is " & lastcell.column also a worksheet's UsedRange returns the area 'used' (!) BUT you alos need to get the Ysed range's position. So a ysedrange begins in row UsedRange.Row and fills UsedRange.Rows.Count so adding these together gives the last row use din a sheet... With ActiveSheet lastrow = .UsedRange.Row + .UsedRange.Rows.Count - 1 End With Patrick Molloy Microsoft Excel MVP ---------------------------------- "Hölzl Otto" wrote in message ... Hallo, friends! Is there a short way to find the first (last) row(column) that contains an entry? Please give me a hint! Thanks Otto |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to find duplicate entry in one sheet and in workbook | Excel Discussion (Misc queries) | |||
find the cell reference for the next occurrance of entry in array | Excel Worksheet Functions | |||
Find cell entry contained anywhere within a text string | Excel Worksheet Functions | |||
in one sheet add one word after every entry in every cell. how? | Excel Worksheet Functions | |||
FIND THE LAST CELL ENTRY IN A ROW | Excel Worksheet Functions |