If then formula for a blank cell

AJSIV4

New Member
Joined
Jan 29, 2013
Messages
4
I have been looking for a formula that will produce a blank cell under certain circumstances. I have found some formulas for this, but not to the level of detail I need it. I've tried "ISBLANK, "SUMIF" and "IF" and I'm stuck.

I need D1 to produce a blank cell if A1 and B1 and C1 are blank. If there is at least one value in A1 or B1 or C1 then I want D1 to produce the sum of A1:C1.

Any help would be great. Thanks.
 

Some videos you may like

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

GRTorres

Active Member
Joined
Nov 19, 2012
Messages
344
Hello AJSIV4, welcome to the board.

try this

Code:
D1  =IF(AND(A1 = "", B1 = "", C1 = ""), "", SUM(A1:C1))
 

AJSIV4

New Member
Joined
Jan 29, 2013
Messages
4
I am still getting 0.00 even with all cells blank. Does it have to do with the cell being formatted as #.##? Here is the actual formula I'm using with the info you gave me above.

Cell H6 contains:
=IF(AND(A6="",B6="",C6="",D6="",E6="",F6="",G6="",),"",SUM(A6:E6))
 

FormR

MrExcel MVP
Joined
Aug 18, 2011
Messages
6,393
Office Version
365
Platform
Windows
I am still getting 0.00 even with all cells blank. Does it have to do with the cell being formatted as #.##? Here is the actual formula I'm using with the info you gave me above.

Cell H6 contains:
=IF(AND(A6="",B6="",C6="",D6="",E6="",F6="",G6="",),"",SUM(A6:E6))
You have an extra comma - try deleting it.

Or give this a try:
=IF(COUNTA(A6:G6)=0,"",SUM(A6:E6))
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,165
I am still getting 0.00 even with all cells blank. Does it have to do with the cell being formatted as #.##? Here is the actual formula I'm using with the info you gave me above.

Cell H6 contains:
=IF(AND(A6="",B6="",C6="",D6="",E6="",F6="",G6="",),"",SUM(A6:E6))
Also...

=IF(COUNT(A6:G6)=COLUMNS(A6:G6),SUM(A6:G6),"")
 

Watch MrExcel Video

Forum statistics

Threads
1,095,979
Messages
5,447,685
Members
405,462
Latest member
est1989

This Week's Hot Topics

Top