Forum Discussion
DeanDean7920
Jun 14, 2022Copper Contributor
EXCEL IF statement
What is wrong with my statement, "Configurator!C42" has a value of 64 but result is 0, not 1?
=IF(Configurator!C42>96<115,1,IF(Configurator!C42>48<68,1,IF(Configurator!C42<=8,1,0)))
2 Replies
Sort By
- JoeUser2004Bronze Contributor
The expression C42>96<115 does not work as you probably intended. And frankly, it is nonsensical.
I suspect you mean 96<C42<115; that is, the value of C42 is between 96 and 115.
But even that does not work in Excel. Instead, we must write AND(96<C42, C42<115).
For your formula, we might write:
=IF(AND(96<Configurator!C42, Configurator!C42<115), 1,
IF(AND(48<Configurator!C42, Configurator!C42<68), 1,
IF(Configurator!C42<=8, 1, 0)))
or
=IF(OR(AND(96<Configurator!C42, Configurator!C42<115),
AND(48<Configurator!C42, Configurator!C42<68), Configurator!C42<=8), 1, 0)
- DeanDean7920Copper ContributorThank you... I'll revise my formula