Syntax for if (or) two out of three

Outline

New Member
Joined
Mar 25, 2009
Messages
20
need help. I want to identify situations where two of the three columns are = 0 within a given row. In the example, below, row 3 needs to have the XX in column F as the TRUE (showing XX, but row 2 would be false, since only 1 of the three columns is zero -this F result would show a BLANK



C D E F (contains my formula)

2 0 5 300 =if(or(sum(c2+d2)=0,"XX",if(sum(C2+e2)=0,"XX",if(sum(c2+e2)=0, "XX", " ")
3 100 0 0


Thanks!
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
I want to identify situations where two of the three columns are = 0 within a given row. In the example, below, row 3 needs to have the XX in column F as the TRUE (showing XX, but row 2 would be false, since only 1 of the three columns is zero -this F result would show a BLANK

C D E F (contains my formula)

2 0 5 300 =if(or(sum(c2+d2)=0,"XX",if(sum(C2+e2)=0,"XX",if(sum(c2+e2)=0, "XX", " ")
3 100 0 0

Give this formula a try...

=IF(COUNTIF(A2:C2,0)=2,"XX","")
 
Upvote 0

Forum statistics

Threads
1,216,119
Messages
6,128,946
Members
449,480
Latest member
yesitisasport

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top