lngLastCol = .range(1,Columns.Count).End(xlToLeft).Column

based upon row 1

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Graham Whitehead" <gwhitehead77@hotmail.com> wrote in message
news:u55DHCLiGHA.4892@TK2MSFTNGP02.phx.gbl...
> For a while now I have been using some code to determine how far down a
> worksheet the last line of data appears. For example:
>
> With ActiveSheet
> lngLastRow = .Range("A65536").End(xlUp).Row
> End With
>
> Does anyone know the equivalent function to count how far out from the

left
> (i.e. if there is data in columns A to G) - I'm sure it must exist but
> cannot quite figure it out.
>
> thanks
>
>
>