If/then help

wbco

New Member
Joined
Jul 26, 2010
Messages
36
Looking for help on this one..... Basically, if cell A1, C1, or E1 has a 1 in it, then in cell G1, give me a total of what's in B1, D1, F1
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Place this formula in G1:
=IF(OR(A1=1,C1=1,E1=1),B1+D1+F1,"")
 
Upvote 0
Awesome! Thank you for the quick reply!... it almost works.... but its adding B1, D1, and F1 even if there's not a value of 1 in A1, C,1, or E1...

I need it so if A1, C1, or E1 has any number other than 1 in it (or blank) then don't include it in the math of B1, D1, and F1

Place this formula in G1:
=IF(OR(A1=1,C1=1,E1=1),B1+D1+F1,"")
 
Upvote 0
OK, that was not clear from your first post.
So it sounds there is a correlation between A1 and B1, C1 and D1, and E1 and F1.

Try this:
=IF(A1=1,B1,0) + IF(C1=1,D1,0) + IF(E1=1,F1,0)
 
Upvote 0
Perfect!!!! Thank you!!!!!!!

OK, that was not clear from your first post.
So it sounds there is a correlation between A1 and B1, C1 and D1, and E1 and F1.

Try this:
=IF(A1=1,B1,0) + IF(C1=1,D1,0) + IF(E1=1,F1,0)
 
Upvote 0
Sorry... one more question... how would I make it so if there is no data in the cells, then the formula cell will just be "blank", rather than displaying a "0" ?

OK, that was not clear from your first post.
So it sounds there is a correlation between A1 and B1, C1 and D1, and E1 and F1.

Try this:
=IF(A1=1,B1,0) + IF(C1=1,D1,0) + IF(E1=1,F1,0)
 
Upvote 0
One way:
=IF(A1&C1&E1="","",IF(A1=1,B1,0) + IF(C1=1,D1,0) + IF(E1=1,F1,0))
 
Upvote 0

Forum statistics

Threads
1,215,001
Messages
6,122,648
Members
449,092
Latest member
peppernaut

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