Compound IF statement


#1

I am trying to write a statement that can assign a value to the cell by evaluating content value from another column (PM), and this is what I’ve got:

IF(PM= “value1”, 1, IF(PM= “value2”, 2, IF(PM= “value3”, 3, IF(PM= “value4”, 4, IF(PM= “value5”, 5, IF(PM= “value6”, 6, “”)))))

I’m getting an error. Can someone help me debug this? THANKS


#2

Looks like you were just missing one closing parenthesis at the end:

IF(PM="value 1", 1, IF(PM="value 2", 2, IF(PM="value 3", 3, IF(PM="value 4", 4, IF(PM="value 5", 5, IF(PM="value 6", 6, ""))))))