Using two variables in for each loop

I have two variables in a document of excel and I need to use these values in a For Each loop, for example:
the first value is a number of a client and I search this client on a website, the second value is a number of impressions.

I need to search the client and the second value in the same For Each loop.
In other words, the for each separate the values of the list in an element, and I need two elements

this image presents the elements


1 Like


I have an excel sheet ( Column A has a list of policy numbers and B has subject-of the mail for renaming)

Im trying to open outlook and search using elements from column A, then forward that found email to a common address, however I’m kind of stuck when it comes to renaming the subject line of that mail (which is found on an excel in column B)…any suggestions ?
How do i incorporate a second loop?

The below code runs fine however it fails to rename the subject before forwarding the mail.

Would really appreciate some help.

1 Like

Hi @trisha @Gamaliel try the solution from this post

Thank you:)

I tried saving it to a table variable and then used a for loop and selected ${element[1]} the ${element [2]}. it seemed to work, however the bot is having issues using inspector, only the x,y position are working and not the window selector, is this a generic problem?, how do i go about accessing my mails since the x, y position are not very reliable.

1 Like

Can you share an example of a window selector that doesn’t work?

Also, do you have 1 or several accounts in Outlook?

i have one account.

The x, y position works only.

You need to have an action switching to the required Outlook window before the mouse click.

once? or before every mouse click?

The best practice is to switch to every new desktop window, but if other mouse clicks are performed in the same window there is no need to switch to it again.

Thank you , i will try that now.

1 Like