Get an index of a column with a cell of a certain word

I got an Excel table (or just a DataTable variable) and I want to find an index of a cell with a certain word. The cell may be in the first line or somewhere in the middle of the table so you can’t exactly know it. Let’s assume it contains a word “UiPath”. How do I find the column index of the cell properly?

What if there are multiple cells with this word? Will I be able to find the indexes of all instances?

I know that I can do double for each but it’s not really comfortable way I suppose.

As I see it there’s a need of a lambda-function but I don’t really know how to use them here.

@jothyprasanth.m Yeah it’s not in a for each loop :slight_smile: I mean this is a very straightforward solution but I would like to make it more comfortable, sustainable and shorter to avoid a bulky code


Check this post
Get row and column index of cell with specific value