ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Can this be simplified (https://www.excelbanter.com/excel-worksheet-functions/48538-can-simplified.html)

Barb Reinhardt

Can this be simplified
 
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

JE McGimpsey

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

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

In article ,
"Barb Reinhardt" wrote:

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


Shatin

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

"JE McGimpsey" wrote in message
...
One way (array-entered: CTRL-SHIFT-ENTER or CMD-RETURN):

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




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!

In article ,
"Shatin" wrote:

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



All times are GMT +1. The time now is 06:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com