BJS
01-14-2016, 05:32 PM
Hi,
I need a little help with If / Or statements.
I have a cell in a sheet (lets call it B4) that will auto populate based on cell B2.
B2 is a drop down in another sheet call "Lookup Values"
My statement is:
=IF(OR(B4='Look Up Values'!Q9,'Look Up Values'!Q10,'Look Up Values'!Q11,'Look Up Values'!Q12,'Look Up Values'!Q16,'Look Up Values'!Q17),1,(OR(B4='Look Up Values'!Q13,'Look Up Values'!Q14,'Look Up Values'!Q15),2,0))
if I make the below change (adding an if, in Bold Red), it will only return the correct value for the first item in each OR statement otherwise will give me a return of 0
=IF(OR(B4='Look Up Values'!Q9,'Look Up Values'!Q10,'Look Up Values'!Q11,'Look Up Values'!Q12,'Look Up Values'!Q16,'Look Up Values'!Q17),1,if(OR(B4='Look Up Values'!Q13,'Look Up Values'!Q14,'Look Up Values'!Q15),2,0))
Any help is appreciated.
Cheers BJS
I need a little help with If / Or statements.
I have a cell in a sheet (lets call it B4) that will auto populate based on cell B2.
B2 is a drop down in another sheet call "Lookup Values"
My statement is:
=IF(OR(B4='Look Up Values'!Q9,'Look Up Values'!Q10,'Look Up Values'!Q11,'Look Up Values'!Q12,'Look Up Values'!Q16,'Look Up Values'!Q17),1,(OR(B4='Look Up Values'!Q13,'Look Up Values'!Q14,'Look Up Values'!Q15),2,0))
if I make the below change (adding an if, in Bold Red), it will only return the correct value for the first item in each OR statement otherwise will give me a return of 0
=IF(OR(B4='Look Up Values'!Q9,'Look Up Values'!Q10,'Look Up Values'!Q11,'Look Up Values'!Q12,'Look Up Values'!Q16,'Look Up Values'!Q17),1,if(OR(B4='Look Up Values'!Q13,'Look Up Values'!Q14,'Look Up Values'!Q15),2,0))
Any help is appreciated.
Cheers BJS