Using If condition To find the Single individual value

Hi All,
I have a column in which O2 exist and I want to check"Does (CR) or (FF) exist above the O2 or not??".
I save that whole column value in a variable and used if condition.
Ex- [if (variable.contains(“CR”)or variable.contains(“FF”).
or [if (variable.equals(“CR”) or variable.contains(“FF”).

I only want, bot should find only individual CR or individual FF.
but bot is not working correct.when there is a value like (MWCR or MWFF) above the O2.It gives yes CR or FF exist.
But I want only “CR” or “FF”.
Can anyone please help that what type of condition should I use??
because both , contains and equals does not work here.
For reference I am sharing the snapshot of that column.

Use two different IF conditions and check for CR in one and FF in another @Nidi2

ok I will try .


kindly find below link it will help

A Manohar

thanks @Manohar1 and @HareeshMR
I have tried both method of yours.
but it gives the wrong output when I checked with MWCR . It gives me CR exist.
Please help


can you debug and check what it is printing while reading MWCR and MWFF from excel.

it is printing whole column value as I have shared you snapshot.
after that I applied if conition and then that if fails.

Can you please provide a sample because its really needed to me.
and bot is giving wrong output


can you share your xaml