Analyst_Kumar
New Member
Is it not possible to use AND / OR with IF condition?
I have a spreadsheet with following data.
Column A has city names such as Delhi, Mumbai, Chennai, Bangalore and Hyderabad.
For column B, I want to set value
to 2 if column A has either Chennai or Bangalore,
to 5 if column A has either Delhi or Mumbai
to 6 if column A has Hyderabad
to 0 if column A has any other value.
I use, If(A2="Chennai" or A2="Bangalore", 2, 99) It is throwing error
I have a spreadsheet with following data.
Column A has city names such as Delhi, Mumbai, Chennai, Bangalore and Hyderabad.
For column B, I want to set value
to 2 if column A has either Chennai or Bangalore,
to 5 if column A has either Delhi or Mumbai
to 6 if column A has Hyderabad
to 0 if column A has any other value.
I use, If(A2="Chennai" or A2="Bangalore", 2, 99) It is throwing error