#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 72
Default IF and SUMIF

So this is what I want to do...
Sum of all negative numbers in range, if there are no negative numbers in
range display 0, if cells in range are blank display "". I tried using
something like this:


IF(B6:E6="","",SUMIF(B6:E6,<0,B6:E6))


Not sure how to do this, hope you can help!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default IF and SUMIF

Try

=IF(ISBLANK(B6:E6),"",MIN(SUM(IF(B6:E6<0,B6:E6,FAL SE)),0))

Attay entered with Ctrl+Shift+Enter and Excel will put curly brackets around
it {}

Mike

"JBoyer" wrote:

So this is what I want to do...
Sum of all negative numbers in range, if there are no negative numbers in
range display 0, if cells in range are blank display "". I tried using
something like this:


IF(B6:E6="","",SUMIF(B6:E6,<0,B6:E6))


Not sure how to do this, hope you can help!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 72
Default IF and SUMIF

I tried it, and what happens is, it displays 0 if there are no negatives, ""
if cells are blank, but not the sum if there are negatives to add. I think i
did it the way you wanted me to try, although I'm confused with what you
wanted me to do with the brackets.

"Mike H" wrote:

Try

=IF(ISBLANK(B6:E6),"",MIN(SUM(IF(B6:E6<0,B6:E6,FAL SE)),0))

Attay entered with Ctrl+Shift+Enter and Excel will put curly brackets around
it {}

Mike

"JBoyer" wrote:

So this is what I want to do...
Sum of all negative numbers in range, if there are no negative numbers in
range display 0, if cells in range are blank display "". I tried using
something like this:


IF(B6:E6="","",SUMIF(B6:E6,<0,B6:E6))


Not sure how to do this, hope you can help!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default IF and SUMIF

Hi,

Enter the formula in a cell and while still in that cell tap

Ctrl+Shift+enter

Excell will add a set of curly brackets around the formula {} You can't type
these yourself.

Mike

"JBoyer" wrote:

I tried it, and what happens is, it displays 0 if there are no negatives, ""
if cells are blank, but not the sum if there are negatives to add. I think i
did it the way you wanted me to try, although I'm confused with what you
wanted me to do with the brackets.

"Mike H" wrote:

Try

=IF(ISBLANK(B6:E6),"",MIN(SUM(IF(B6:E6<0,B6:E6,FAL SE)),0))

Attay entered with Ctrl+Shift+Enter and Excel will put curly brackets around
it {}

Mike

"JBoyer" wrote:

So this is what I want to do...
Sum of all negative numbers in range, if there are no negative numbers in
range display 0, if cells in range are blank display "". I tried using
something like this:


IF(B6:E6="","",SUMIF(B6:E6,<0,B6:E6))


Not sure how to do this, hope you can help!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 72
Default IF and SUMIF

Thanks alot!

"Mike H" wrote:

Hi,

Enter the formula in a cell and while still in that cell tap

Ctrl+Shift+enter

Excell will add a set of curly brackets around the formula {} You can't type
these yourself.

Mike

"JBoyer" wrote:

I tried it, and what happens is, it displays 0 if there are no negatives, ""
if cells are blank, but not the sum if there are negatives to add. I think i
did it the way you wanted me to try, although I'm confused with what you
wanted me to do with the brackets.

"Mike H" wrote:

Try

=IF(ISBLANK(B6:E6),"",MIN(SUM(IF(B6:E6<0,B6:E6,FAL SE)),0))

Attay entered with Ctrl+Shift+Enter and Excel will put curly brackets around
it {}

Mike

"JBoyer" wrote:

So this is what I want to do...
Sum of all negative numbers in range, if there are no negative numbers in
range display 0, if cells in range are blank display "". I tried using
something like this:


IF(B6:E6="","",SUMIF(B6:E6,<0,B6:E6))


Not sure how to do this, hope you can help!



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default IF and SUMIF

Glad I could help and thanks for the feedback

Mike

"JBoyer" wrote:

Thanks alot!

"Mike H" wrote:

Hi,

Enter the formula in a cell and while still in that cell tap

Ctrl+Shift+enter

Excell will add a set of curly brackets around the formula {} You can't type
these yourself.

Mike

"JBoyer" wrote:

I tried it, and what happens is, it displays 0 if there are no negatives, ""
if cells are blank, but not the sum if there are negatives to add. I think i
did it the way you wanted me to try, although I'm confused with what you
wanted me to do with the brackets.

"Mike H" wrote:

Try

=IF(ISBLANK(B6:E6),"",MIN(SUM(IF(B6:E6<0,B6:E6,FAL SE)),0))

Attay entered with Ctrl+Shift+Enter and Excel will put curly brackets around
it {}

Mike

"JBoyer" wrote:

So this is what I want to do...
Sum of all negative numbers in range, if there are no negative numbers in
range display 0, if cells in range are blank display "". I tried using
something like this:


IF(B6:E6="","",SUMIF(B6:E6,<0,B6:E6))


Not sure how to do this, hope you can help!

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default IF and SUMIF

Hmmmmmm

What's the expression KISS
Yes it does well spotted :)

Mike


"Sandy Mann" wrote:

Mike,

Doesn't your formula work just as well without the MIN() function?

=IF(ISBLANK(B6:E6),"",SUM(IF(B6:E6<0,B6:E6,FALSE)) )

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Mike H" wrote in message
...
Try

=IF(ISBLANK(B6:E6),"",MIN(SUM(IF(B6:E6<0,B6:E6,FAL SE)),0))

Attay entered with Ctrl+Shift+Enter and Excel will put curly brackets
around
it {}

Mike

"JBoyer" wrote:

So this is what I want to do...
Sum of all negative numbers in range, if there are no negative numbers in
range display 0, if cells in range are blank display "". I tried using
something like this:


IF(B6:E6="","",SUMIF(B6:E6,<0,B6:E6))


Not sure how to do this, hope you can help!





  #9   Report Post  
Member
 
Posts: 58
Default

JBoyer:

This should work for you.

=IF(ISBLANK(B6:E6),"",IF(SUMIF(B6:E6,"<"&0,B6:E6)= 0,"",SUMIF(B6:E6,"<"&0,B6:E6)))
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default IF and SUMIF

To comply with the OP's requirement of returning a 0 for all positive
numbers I think that your second "" need to be a zero:

=IF(ISBLANK(B6:E6),"",IF(SUMIF(B6:E6,"<"&0,B6:E6)= 0,0,SUMIF(B6:E6,"<"&0,B6:E6)))

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"GoBow777" wrote in message
...

JBoyer:

This should work for you.

=IF(ISBLANK(B6:E6),"",IF(SUMIF(B6:E6,"<"&0,B6:E6)= 0,"",SUMIF(B6:E6,"<"&0,B6:E6)))




--
GoBow777



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
sumif sumif Excel Worksheet Functions 1 February 4th 08 02:32 AM
sumif for multi conditions. i.e sumif(A1:A10,"Jon" and B1:B10,"A" Harry Seymour Excel Worksheet Functions 9 June 12th 07 10:47 PM
Embedding a Sumif in a sumif C.Pflugrath Excel Worksheet Functions 5 August 31st 05 07:31 PM
nested sumif or sumif with two criteria dshigley Excel Worksheet Functions 5 April 5th 05 03:34 AM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 11th 05 11:01 PM


All times are GMT +1. The time now is 01:30 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"