How to assign a value from one column of Data Table to a variable by checking another column value

Hi All,

Can you please guide me on achieving this task?

I’m using an excel read range to get data from two columns (Ex: Col 0, Col 1) and storing in Data Table.
Now I want to assign each value of col 1 to a new variable by checking the values of col 0. Please see the below screenshot.
For example:
Variable 1= john (before assigning this I want to check whether col 0 value is “Name”)

Variable 2= US(before assigning this I want to check whether col 0 value is “Country”)

I tried for each row with assign activity but it’s assigning same row value to all the variables.

Please advice. Thanking you in advance! :slight_smile:


HI @Rohit_Gorilla,

Pls check this, might help you.

1 Like

Hi @Rohit_Gorilla
Please try using below workflow… Let me know if it is as per your requirement.Forum1.xaml (6.8 KB)


Hi @Rohit_Gorilla

Below is the workflow which gives the output as expected by you when the condition gets fulfilled.
Main.xaml (13.0 KB)

Excel :-
IncreamentMonthAsPerSerialNo.xlsx (9.2 KB)

Output :-

Hope this may help to solve your issue
Mark as solution if this helps you and like it :innocent:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

1 Like

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