For loop with if statements

excel-loop
statements

#1

Good day

I have three list in excel.first column is random products. 3rd column is the names of all the products that exist. The 2 list is a message specific to the 3nd column

I want to use column one as my first for loop
then another for loop with column 3.
Then a if statement to compare the the items in the second for loop with list 1.if the are the same they must post the message in the 2 column

image
image


If statement - Comparing one items in a list for each items in a for loop
#2

@gerhardus_meyer - please see solution to this topic - Store values in a table variable and use it when a execution time


#3

Hi,

I am also facing issue with if else condition inside a For each loop.

I have a list of some values and i am checking a particular value exists in the list or not?

but in For each loop it executed for first item the if statement was not satisfied so it came out of the For each loop.
It should check for next item right

In below screenshot it did not check for next item


#4

please post your zipped recording folder and the excel file here


#5

Hi,

It actually worked
I did some debugging and found when it opens the excel it points to sheet 2 instead of sheet 1.
I specified the sheet properly and it worked.