Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Formula that will leave cell blank if cell is blank

I have a formula adding & subtracting the number values in 3 different cells
into a fourth cell, however I need to change the formula so that if one of
the cells is blank, the fourth cell sum will show blank too.

I think a simple IF formula will work, but I don't know how to tell the
formula if the cell is blank.

example: A1 =Sum(A2-A3+A4)

I've tried something like: IF(A2=blank,"",sum(A2-A3+A4)
but I get an error.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Formula that will leave cell blank if cell is blank

blank cells are equal to a zero length string:
=IF(A2="","",A2-A3+A4)
(note: the SUM function was redundant, here)
Another way, if you want to check all three cells, recognizing that COUNT
only counts numbers:
=IF(COUNT(A2:A4)<3,"",A2-A3+A4)

--
- K Dales


"jimtmcdaniels" wrote:

I have a formula adding & subtracting the number values in 3 different cells
into a fourth cell, however I need to change the formula so that if one of
the cells is blank, the fourth cell sum will show blank too.

I think a simple IF formula will work, but I don't know how to tell the
formula if the cell is blank.

example: A1 =Sum(A2-A3+A4)

I've tried something like: IF(A2=blank,"",sum(A2-A3+A4)
but I get an error.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If formula result = 0, do not display-leave cell blank ASG Excel Worksheet Functions 3 December 3rd 08 09:37 AM
leave cell blank and continue with formula hlpme Excel Worksheet Functions 4 December 3rd 07 11:04 PM
How to leave a formula cell blank when it has no calculation to make Colin Hayes Excel Discussion (Misc queries) 9 May 13th 07 04:41 AM
Formula <0 leave cell blank Whit Excel Discussion (Misc queries) 3 August 13th 06 02:47 AM
How do I leave formula cell blank if 2nd reference cell is empty? Liana S Excel Discussion (Misc queries) 2 October 21st 05 04:38 PM


All times are GMT +1. The time now is 04:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"