How to find the last filled value cell address

Hi @sruthesanju

Try looking at this post. The alternative is to open Excel and property visible checked.
Send HotKey

  1. Ctrl+End
  2. Ctrl+Down Arrow
  3. Ctrl+Right Arrow

Hi @sruthesanju

If we know the last index of the we can get it by using ASCII Value.


Please refer to the xaml below.

Main.xaml (7.2 KB)


How to get last index of the row

Hi @sruthesanju


This will gives the count of the last index


For particular roe how to get last index

Hi @sruthesanju

check with the below thread !


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)

Getting the above mentioned issue

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

Here in fifth row last filled column is D5 hoe to find that

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

You want the highlighted last filled value, is it?

Yes it’s cell address

I have ran the same code and it is printing right value, not sure why you are not getting it.

Let me out this variable instead of message box then just use that variable.