Select rows in columns for each

Hi guys.

I’m having an issue i just can’t wrap my head around.

I’m trying to run a process in a for each loop where i copy the value in cell A1 in first loop, A2 in second loop etc and saving the value in a datatable and using get row item to send my value to a webtable. My process is running perfectly, but i need to bring one more cell in play for each loop.

How can i make my for each loop copy cell A1, save to a variable AND copy cell B1, and save to a variable in first loop - then in the second loop copy cell A2 and B2 and so on for each loop i’m running?

Thanks. :slight_smile:

Hello @vovivo,

I’ve attached a zip file where I have done what I believe you wished for.

Cheers.
forEach.zip (7.8 KB)

Awesome. Exactly what i was looking for.

Just to make sure i understood correctly: In your example i will be able to assign i new variable (varC) to row(2).ToString if i need it right?

Thanks.

1 Like

Yep :slight_smile:

You can also do row(“NameOfTheColumn”).ToString as long as your Read Range activity has “Add Headers” checked.

You are most welcome.

1 Like