Find the cell_position

Hi everyone,

I have a data in excel. and there O2 exist. but I want to fetch the position of O2.
Like I am attaching the excel file and here O2 exist in B2 cell.
so I want output is in message box with its cell position B2.
can anyone help please…

Hi @Nidhi2

Try this

Find a cell position in Data Table


1 Like

thanks @AshwinS2.
But it does not give me desired solution.
If you understand my query then please help , if you can…

hi @Nidhi2
You can follow these steps :

  1. Read Range sheet1 —> Dt
  2. For each row —> row In Dt
  3. Assign rowIndex = Dt.Rows.IndexOf(row) —> to get row index. (eg. 3 )
  4. while colCount < Dt.Columns.Count —> to iterate loop for all columns. ( where colCount = 0)
  5. If (row(colCount).ToString).Equals(“Sam”) —> to search “Sam” (any string) in all columns.
    Then assign – colName = convert.ToChar(65+colCount).ToString —> to get column (eg. B )
  6. print or assign colName+(rowIndex+2).ToString → to get cell position

here I’m attaching my sample workflow : Excel Cell (19.0 KB)
for your understanding.

I hope this will help you. :slight_smile:

1 Like

thanks @samir
It is working fine .
thanks for your help.

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