ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Orif (https://www.excelbanter.com/excel-discussion-misc-queries/99447-orif.html)

Brento

Orif
 

HI All,

I am trying to write an OR IF formula. Maybe there is an easier way.

This is what I am trying to write
=IF(a2=D1,1,0),orif(B2=D1,2,0),orif(C2=D1,1,0) - The formula would be
in D2

What the formula needs to say is if the value in A2 equals D1 return
value 1, or if not then if the value in B2 equals D1 return value 2, or
if not then if the value in C2 equals D1 return value 1.

Please help maybe I am trying the wrong formular?

thanks
Brento


--
Brento
------------------------------------------------------------------------
Brento's Profile: http://www.excelforum.com/member.php...o&userid=25213
View this thread: http://www.excelforum.com/showthread...hreadid=561714


Niek Otten

Orif
 
Hi Brento,

=IF(A2=D1,1,IF(B2=D1,1,IF(C2=D1,1,0)))

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Brento" wrote in message
...
|
| HI All,
|
| I am trying to write an OR IF formula. Maybe there is an easier way.
|
| This is what I am trying to write
| =IF(a2=D1,1,0),orif(B2=D1,2,0),orif(C2=D1,1,0) - The formula would be
| in D2
|
| What the formula needs to say is if the value in A2 equals D1 return
| value 1, or if not then if the value in B2 equals D1 return value 2, or
| if not then if the value in C2 equals D1 return value 1.
|
| Please help maybe I am trying the wrong formular?
|
| thanks
| Brento
|
|
| --
| Brento
| ------------------------------------------------------------------------
| Brento's Profile: http://www.excelforum.com/member.php...o&userid=25213
| View this thread: http://www.excelforum.com/showthread...hreadid=561714
|



Franz Verga

Orif
 
Brento wrote:
HI All,

I am trying to write an OR IF formula. Maybe there is an easier way.

This is what I am trying to write
=IF(a2=D1,1,0),orif(B2=D1,2,0),orif(C2=D1,1,0) - The formula would be
in D2

What the formula needs to say is if the value in A2 equals D1 return
value 1, or if not then if the value in B2 equals D1 return value 2,
or if not then if the value in C2 equals D1 return value 1.

Please help maybe I am trying the wrong formular?

thanks
Brento


Hi Brento,

try this:

=IF(OR(a2=D1,C2=D1),1,IF(B2=D1,2,0))


--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy




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

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