How to get a cell number from the value in the excel sheet


Assume i have cell from A to D and my item(X) resides at D5.
I’m able to get the item (X) from the column D, but how do i get which row it falls (D5)?

any suggestion … :confused:

This can be done using Macro.

Search for the value in the sheet using the macro,
and if the value is found use this:
MsgBox Replace(Cells(i, j).Address, "$", "")

Here i and j are the row and column integers

What answer do you want in the output?

Row Index? Which is 4 (5th row. in Datatable)

Cell cound ? Which is D5.

thank you, but i can’t use macro here. I want to achieve just by using uipath.

cell .which is D5. :slight_smile:

You can execute an excel macro using UiPath.Please check.

Let’s start with a bad solution ( I need to think of better one).

If you know the Range, create datatable the columns as A,B,C,D and perform read Read range.

Do foreach loop

If(row(col)= item X)
Cell number = col.tostring+rowIndex.Tostring() (hmm…or rowIndex+1).Tostring)

One more bad solution:

Take Alphabets in Array - A B C D

Iterate the Array by use Read Cell till you get the Value and Cell Number.

1 Like

yes UiPath just executes that macro created in excel sheet. I just want to use activity and .net code available.

let me try . thanks for the quick response .