Equals with OR

Hello,

I am trying to check if a string in the cell in excel matches any of the provided string.
Currently i am reading the excel and its rows using for each activity, now want want to check if the desired cell consist one of the 3 provided strings and accordingly perform further steps

row.Item(1).Equals(“low” or “medium” or “high”)

above written statement is not working.

Can you please provide a solution

Thanks,
Aishwarya

Try this @Aishwarya_Thakur

row.item(1).tostring = “low” or row.item(1).tostring = “Medium” or row.item(1).tostring = “high”

3 Likes

Hi
In addition Hope this could help you
row(1).Equals(“low”) OR row(1).Equals(“medium”) OR row(1).Equals(“high”)
Cheers @Aishwarya_Thakur

2 Likes

Thank you @HareeshMR @Palaniyappan :slight_smile:

1 Like

Cheers @Aishwarya_Thakur

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