Get Cell Address of non empty cell in column in Excel

Hello Friends,

Is there any way where we can get Cell address of last cell in last column.

Thanks in Advance.

Hi @Pramod_Bharat_Mangale ,

Could you Specify what is the Cell Address that you are specifying ?

The Cell Name in Excel ? Like A1, B4 … ?

@Pramod_Bharat_Mangale ,

You Could Try Checking the Below Post :

It’s not the Exact case, but we can derive your Solution From the Steps and Expression mentioned.

Hi @Pramod_Bharat_Mangale ,

Could you give this a try?


But if you meant to say the cell in the botton right corner, then you could give this a try →


Kind Regards,
Ashwin A.K

1 Like

If we go with dt.Rows.Count-1, then we are getting last cell as E6 which is not actual last cell, it is E8 in my sheet. So instead of -1 when I tried +1, so code will be :


I am getting desired Output that is E8.

Thank you

Hi @Pramod_Bharat_Mangale ,

Ah yes, my mistake.
I forgot to factor in the fact that the header is not considered, so yes we have to add one.

Kind Regards,
Ashwin A.K

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.