Three conditional if statements in same cell

techgirl

Board Regular
Joined
Sep 16, 2002
Messages
178
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I have three conditions in one cell...

Cells C3, D3, E3, can have blanks, zeros or numbers.

Here is the conditions...
Sum(C3:E3) are all blanks, leave cell empty
Sum(C3:E3) >0 = return sum
Sum(C3:E3) =0 = return a zero

How would I write that in a single formula?
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Or
=IF(C3&D3&E3="","",SUM(C3:E3))
 
Upvote 0
Thank you that worked, except for the formatting color of clear(no formatting. If there was previously a value in the cells, then I go back and make all three null, no values, no characters, it turns yellow., even though all three cells are blank. I don't know how to make the cell go back to no formatting if the value is blank.
 
Upvote 0
Do you have Conditional formatting applied to the cell?
 
Upvote 0
Yes. The cells that are just values and not a formula, the conditional formatting works. Its just the columns that are doing the sum, that doesn't work for blanks. Yellow works when there is a number, green works when there is a zero, but when the cells are blank, it keeps the yello; it never goes back to clear.

Conditional formatting rules...
Green; =AND(C3=0,C3<>"")
Yellow; Cell value greater than 0
No formatting; =isblank($c$3:$W$6)
 
Upvote 0
Change you yellow format to a formula
=AND(E3>0,E3<>"")

There should be no need to set a format for no formatting as that is the default
 
Upvote 0
OMGoodness, it was that easy. Thank you so much; everyone was wonderful in helping me!!
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,226
Members
452,620
Latest member
dsubash

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