Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Cheryl McHarg
 
Posts: n/a
Default sum numbers only when a named cell is not zero

In my spreadsheet, I need cell L10 to sum cells ( M10-P10) if P10 does not
equal zero. P10 is a formula=+n10+O10.
  #2   Report Post  
Bryan Hessey
 
Posts: n/a
Default


Cheryl,

try

=if($P$10<0,sum(M10:P10),"")

or

=if($P$10<0,sum(M10:P10),0)

to reflect a zero.


Cheryl McHarg Wrote:
In my spreadsheet, I need cell L10 to sum cells ( M10-P10) if P10 does
not
equal zero. P10 is a formula=+n10+O10.



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=399694

  #3   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

=IF(P10<0,SUM(M10:P10),"")

Given P10's formula, it could also be

=IF(P10<0, 2*P10+M10,"")

or, if you want to return 0 instead of a null string:

=(P10<0)*(2*P10+M10)


Note that the first "+" in your formula is superfluous.

In article ,
"Cheryl McHarg" <Cheryl wrote:

In my spreadsheet, I need cell L10 to sum cells ( M10-P10) if P10 does not
equal zero. P10 is a formula=+n10+O10.

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
numbers being entered show in formula bar but not in cell? Jim in Florida Excel Discussion (Misc queries) 2 May 13th 05 06:36 PM
Cell will not format numbers correctly for a 13 digit custom barc. Laudan Excel Worksheet Functions 4 April 11th 05 08:13 PM
Averaging Numbers when 2 numbers in one cell Ourania Excel Worksheet Functions 8 January 12th 05 06:40 PM
Named Cell Ranges Blackcat Excel Discussion (Misc queries) 7 December 9th 04 01:59 PM
Paste rows of numbers from Word into single Excel cell BecG Excel Discussion (Misc queries) 1 December 8th 04 04:55 PM


All times are GMT +1. The time now is 01:49 AM.

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"