Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Cell to return blank not 0

In cell b14 this is my formula - if these cells are blank i want the return
to be blank it is giving me a return of 0
=if(sum(b4:B13),"",sum(b4:B13))

--
Message posted via http://www.officekb.com

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 60
Default Cell to return blank not 0

On Nov 25, 11:05*am, "Darts via OfficeKB.com" <u19990@uwe wrote:
In cell b14 this is my formula - if these cells are blank i want the return
to be blank it is giving me a return of 0
=if(sum(b4:B13),"",sum(b4:B13))

--
Message posted viahttp://www.officekb.com


This formula won't work as the if statement is not entirely correct.

If Sum(b4:B13) then
Null
Else
Sum(B4:B13)
End If

There's nothing to compare it against in the If clause..... it should
be something like

If Sum(B4:B13) = 0 Then
Null
Else
Sum(B4:B13)
End If

or

=IF(sum(b4:b13)=0,"",Sum(B4:B13))

or.... use custom number formats.....

Why not use a custom number format on the cell.
Something along the lines of this.... _-* #,##0_-;-* #,##0_-;_-* ""??
_-;_-@_-

Format Cells Custom


If you want decimal places then it would look like.....


_-* #,##0.00_-;-* #,##0.00_-;_-* ""??_-;_-@_-


If you want a dash (using the decimal places)


_-* #,##0.00_-;-* #,##0.00_-;_-* "-"??_-;_-@_-


Try that.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default Cell to return blank not 0

What do you mean by "these cells" -- all cells in the range b4:b13? If so,
try:

=if(count(b4:b13)0,sum(b4:b13),"")

Regards,
Fred.

"Darts via OfficeKB.com" <u19990@uwe wrote in message
news:8db1c7edb6a62@uwe...
In cell b14 this is my formula - if these cells are blank i want the
return
to be blank it is giving me a return of 0
=if(sum(b4:B13),"",sum(b4:B13))

--
Message posted via http://www.officekb.com


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,346
Default Cell to return blank not 0

Hi,

Try =IF(SUM(B4:B13),SUM(B4:B13),"")

This works because if SUM(B4:B13) returns 0 Excel considers it FALSE, for
any other number Excel considers it TRUE.

If this helps, please click the Yes button

Cheers,
Shane Devenshire

"Darts via OfficeKB.com" wrote:

In cell b14 this is my formula - if these cells are blank i want the return
to be blank it is giving me a return of 0
=if(sum(b4:B13),"",sum(b4:B13))

--
Message posted via http://www.officekb.com


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 60
Default Cell to return blank not 0


Try =IF(SUM(B4:B13),SUM(B4:B13),"")

This works because if SUM(B4:B13) returns 0 Excel considers it FALSE, for
any other number Excel considers it TRUE.

If this helps, please click the Yes button

Cheers,
Shane Devenshire



I've never come across that one before, works great!


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 44
Default Cell to return blank not 0

Just a quick thanks for that explanation. I was reading these thinking that
the first parameter doesn't return a logical value. Turns out I was wrong.

"Shane Devenshire" wrote:

Hi,

Try =IF(SUM(B4:B13),SUM(B4:B13),"")

This works because if SUM(B4:B13) returns 0 Excel considers it FALSE, for
any other number Excel considers it TRUE.

If this helps, please click the Yes button

Cheers,
Shane Devenshire

"Darts via OfficeKB.com" wrote:

In cell b14 this is my formula - if these cells are blank i want the return
to be blank it is giving me a return of 0
=if(sum(b4:B13),"",sum(b4:B13))

--
Message posted via http://www.officekb.com


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 143
Default Cell to return blank not 0

Try =IF(SUM(B4:B13),SUM(B4:B13),"")

I've never come across that one before, works great!


.... unless, of course, there are numbers in B4:B13 but the sum happens to
be zero by coincidence.
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 143
Default Cell to return blank not 0

Try =IF(SUM(B4:B13),SUM(B4:B13),"")

I've never come across that one before, works great!


.... unless, of course, there are numbers in B4:B13 but the sum happens to
be zero by coincidence.
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
Return value of a non blank cell Sal Excel Discussion (Misc queries) 10 April 7th 10 02:52 PM
If cell blank return a blank Angela1979 Excel Worksheet Functions 8 March 7th 07 01:18 PM
Return a value to a cell that is blank hilltop55 Excel Discussion (Misc queries) 2 February 1st 07 08:58 PM
return a blank cell jpotts8117 Excel Worksheet Functions 5 September 23rd 05 08:33 PM
return zero from a blank cell Eric Excel Worksheet Functions 5 July 15th 05 11:23 PM


All times are GMT +1. The time now is 08:06 PM.

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

About Us

"It's about Microsoft Excel"