View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Find last used cell in row with blanks inbetween

In Excel 12 we must use
Cells(1, Columns.Count).End(xlToLeft).Select


I mean that this is working in all Excel versions
also Excel 12 with 16,384 columns

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ron de Bruin" wrote in message ...
Hi Less

Try

Range("IV1").End(xlToLeft).Select

In Excel 12 we must use
Cells(1, Columns.Count).End(xlToLeft).Select



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Les Stout" wrote in message ...
Hi, i need to start at cell A1 and find the last used cell in the same
row using code. The only problem is that there are sometimes one or two
blanks in the row.I know i can use - Selection.End(xlToRight).Select
But the problem is that it stops at the blanks too.

Any help with some code would be appreciated.

thanks in advance.

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***