Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Removing minus numbers from a sumif

I am using the following countif formula in my spreadsheet

=SUMIF($B$3:$B$158,B167,$R$3:$R$158)/COUNTIF($B$3:$B$158,B167)

However I would like my sumif to ignore minus values (or replace them with a
0), have you any ideas how this could be done?

Thanks

Nick

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Removing minus numbers from a sumif

This conforms with your formula

=SUM(IF(($B$3:$B$158=B16)*($R$3:$R$158=0),$R$3:$R $158))/COUNTIF($B$3:$B$158
,B16)

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter,

but are you not just trying to average it, in which case you should use

=AVERAGE(IF(($B$3:$B$158=B16)*($R$3:$R$158=0),$R$ 3:$R$158))

also an array formula, otherwise you sum the = 0 items, but divide by a
count of all of them.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"nir020" wrote in message
...
I am using the following countif formula in my spreadsheet

=SUMIF($B$3:$B$158,B167,$R$3:$R$158)/COUNTIF($B$3:$B$158,B167)

However I would like my sumif to ignore minus values (or replace them with

a
0), have you any ideas how this could be done?

Thanks

Nick



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
Subtotaling minus negative numbers and posative numbers lehigh46 Excel Worksheet Functions 3 July 18th 07 01:29 PM
Removing beginning minus sign from telephone numbers Henrik Johnson Excel Discussion (Misc queries) 6 January 11th 07 03:28 PM
col of minus numbers changed to plus numbers Cecil1234 Excel Worksheet Functions 4 December 7th 06 01:04 AM
How do I change minus numbers to + numbers in a col in Excel? Paul L Charts and Charting in Excel 1 May 16th 06 09:06 PM
Sum of a row minus two smallest numbers Philippe Excel Worksheet Functions 2 August 29th 05 06:55 PM


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