How to find the last filled column of particular row

How to find the last filled row of particular column for ex:last filled column of row no :5 is 7

Hi @sruthesanju , can you please show the sample data

sample.xlsx (4.8 KB)
Here the last filled column is A1 so I have to fill the next value in B1

do column have headers or not?

No headers

Hi.

firstEmptyColIdx = row.ItemArray.TakeWhile(Function(x) Not String.IsNullOrEmpty(x.ToString)).Count
And to convert the column index to an excel cell:

the title and the details do missmatch:

find last filled row vs find last filled column from row

Case: find row index of last row containing value within a particular column

YourDataTableVar.AsEnumerable.ToList.FindLastIndex(Function (x) Not (IsNothing(x(YourColNameOrIndex)) OrElse String.IsNullOrEmpty(x(YourColNameOrIndex).toString.Trim)))