How get the content of one cell depend on another specific cell in excel files

dear all,
I have an excel file like the figure displayed,

In A column, I use the for each row activity , could get part of conent, like 102 103 and print them one by one.
how could I get the content of B colum depend on the specific cell in A column
like 102 corresponding to lemon
103 - desk

anybody could guide me to deal with this problem. thank a lot in advance.

You could use a If block within the for each row and say you are interested in 102

Your if condition will be row(“code”).To String.Trim = “102”
Then : log message row("content).ToString.Trim
Else : blank

Here row is the name you provide to each item in the for each row activity. By default I think it’s row.

This will write lemon to console or you could use an assign activity and save the output as variable for later use.

thanks a lot for your reply、
could you give me some demo flow?

the number 102 is a variable

Variable = 102

Your if condition will be row(“code”).To String.Trim = Variable.ToString.Trim

Then : log message row("content).ToString.Trim
Else : blank

still feel confuse. could you give me some demo .xaml file?

I think you misundertand, I use for each row activity to print each row(“code”) content , then I want to use the print variable to get the correspond cotent in row B

Ok. I understand now, you want the “content” column value as you loop along with the “code” column.

Result
image

Here is the workflow
GetAdjacentColumnValue.zip (6.0 KB)

Hope it helps!