View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default 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