Excel For Each - how to loop the row number

Hi,

I created a table called Data1 and I want to loop each of Row in the Data1 table. How do i make the “Data1.Row(??)(1).toString” as a variable . See below picture highlighted in yellow colour.

Thanks
AM

You can use,
Data1_Check = row(“Column Name”).tostring.trim
and can you send the screenshot of table you created?

This is how my Data1 table look like. What i want is to go through each row, if OK then do something, if Error then do something else

image

Then use below code, @AlbertM
Data1_Check = row(“Column1”).tostring.trim and then if condition Data1_Check.Equals(“OK”).

instead of row(“Column1”), can i change it to row(2), would that work or something like row()(2)…?

Yes you can use row(1) or row(2).

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