Can this be simplified

B

Barb Reinhardt

I have the following formula:

=(IF((OR($B$41="AA",$B$41="BB",$B$41="CC")),P42,NA()))

I think I've seen another "more elegant" way to express it, but I just don't
remember what it is. Can someone assist?

Thanks,
Barb Reinhardt
 
J

JE McGimpsey

One way (array-entered: CTRL-SHIFT-ENTER or CMD-RETURN):

=IF(OR(B41={"AA","BB","CC"}),P42,NA())
 
S

Shatin

The formula works OK for me WITHOUT being array-entered (since we are
dealing with array constants and not array variables).
 
J

JE McGimpsey

Yup - I'd originally written the response with several different
solutions, and neglected to take the array-entry out when I edited.

Thanks for the correction!
 
Top