Thread
:
Find column number of last used cell in a row
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Find column number of last used cell in a row
finalcolumn = Cells(Selection.Row, Selection.Column).End(xlToRight).Column
MsgBox finalcolumn
Range(Selection, Cells(Selection.Row,
Selection.Column).End(xlToRight)).Select
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"KG Old Wolf" wrote in message
...
I want to dynamically create ranges beginning in Row 1 but I am having
trouble finding the last column. There are other cells in use on Row 1 in
the worksheet so I don't want to use Last Column or Last Cell or start
from
the rightmost column and use xlToLeft. I can find the LastRow easily
enough
I thought starting in A1 and going ri9ght and select would do it but that
isn't working.
FinalColumn = Cells(Selection.Selection.End(xlToRight)).Select
Any suggestions?
Thanks
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett