View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
ozgrid.com ozgrid.com is offline
external usenet poster
 
Posts: 464
Default code for col number of last used cell in a row

Dim lCol as Long

lCol=Cells(1,Columns.Count).End(XlToLeft)).Column



--
Regards
Dave Hawley
www.ozgrid.com
"Jack Sons" wrote in message
...
Hi all,

I knew it once, but I didn't program for a long time:
What is the best code to get the column number (number!) of the last non
blank cell in a row?
TIA

Jack Sons
The Netherlands