I have to find the last filled value cell address
For example if the last filled row is A1 the output should be A1
Hi @sruthesanju
Try looking at this post. The alternative is to open Excel and property visible checked.
Send HotKey
- Ctrl+End
- Ctrl+Down Arrow
- Ctrl+Right Arrow
Hi @sruthesanju
If we know the last index of the we can get it by using ASCII Value.
Convert.ToChar(65).ToString+(rowIdx).ToString
Please refer to the xaml below.
Main.xaml (7.2 KB)
Regards
How to get last index of the row
For particular roe how to get last index
You can also get this from VBA code.
Dim Last_Row As Long
Dim Last_Col As Long
'Find the last non-blank cell in column A
Last_Row = Cells(Rows.Count, 1).End(xlUp).Row
'Find the last non-blank cell in row 1
Last_Col = Cells(1, Columns.Count).End(xlToLeft).Column
MsgBox "Last Row: " & Last_Row & vbNewLine & _
"Last Column: " & Columns(Last_Col).Address(False, False)
Hi @sruthesanju ,
Try below code.
GetLastRow.xaml (7.9 KB)
Make sure you have installed below package
Will I get output for particular row last filled cell address
Load the sheet into a datatable. The number of rows in the datatable is the last filled row number. Then loop through the columns in that row to find the number (column index) of the last filled column. Convert that number to a letter (ie 1=A, 2=B, 3=C) etc.
Just remember, row and column indexes are zero based. So a column index of 2, you add 1, and that gives you 3 (C).
This is what you are looking for, to get Address of last filled cell?
What the invoke code giving you ?
I get XFD506 As output
Any updates on above mentioned question
Is it possible for you to share the file or dummy of it as same code working for me on test file ?
period-WPS Office.xls (10.5 KB)
Here I have the see the last filled row of period
Yes it’s cell address