cancel
Showing results for 
Search instead for 
Did you mean: 

MS Excel VBO - Find last column/Conver last column number to letter

IanHu
Level 2
Hell all, I have an existing code to find the number of rows in a worksheet but I would like to find the last column as well, the existing find last row code reads below: rowcount = GetWorksheet(handle,workbookname,worksheetname).Cells.Find("*", , , , , 2).Row I am trying to find the column numbers using this code by changing ".Row" above to ".Column", is this a correct way to go? Further, I want to convert this column number from number to letter (i.e. if there are 5 columns it would be "E") and I have no idea how to write this code, does anybody here know how to write anything that can help me achieve this goal? Thanks so much in advance!
1 REPLY 1

Denis__Dennehy
Level 15
There is an action in the MS Excel VBO called Find Next Empty Cell Right, which will return the next empty cell to the right. Can this be used in some way?