Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 128
Default SUMIF multiple criteria

I've written the formula below, but I'm getting a result of zero. I'm trying
to sum cells C5:C750 where cells D5:D750 are equal to either a zero or an
#N/A value.

By just specifying the zero or just specifying the #N/A, I get the correct
result, but I need to combine the two.

=SUMIF('Business Both Years'!D5:D750,"0"&"#N/A",'Business Both Years'!C5:C750)

Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default SUMIF multiple criteria

Use a pair of SUMIF()s

=SUMIF(criteria1) + SUMIF(criteria2)
--
Gary''s Student - gsnu200747


"Sarah (OGI)" wrote:

I've written the formula below, but I'm getting a result of zero. I'm trying
to sum cells C5:C750 where cells D5:D750 are equal to either a zero or an
#N/A value.

By just specifying the zero or just specifying the #N/A, I get the correct
result, but I need to combine the two.

=SUMIF('Business Both Years'!D5:D750,"0"&"#N/A",'Business Both Years'!C5:C750)

Any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default SUMIF multiple criteria

Personally I would go for the DSUM formula, but without your range and
column headings I can't give you a sensible example.

Giff

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 128
Default SUMIF multiple criteria

Thanks for your prompt response. That works a treat!

In another cell, what would I need to enter to sum cells C5:C750 where
D5:D750 DO NOT equal zero or #N/A. When I use the following formula
(adopting the solution you suggested), the result identifies a) all the cells
in column C where cells in column D do not equal zero and b) all the cells in
column C where cells in column D do not equal #N/A, and combining the
results, i.e. it's duplicating the results because there is multiple criteria.

=SUMIF('Business Both Years'!D5:D750,"<0",'Business Both
Years'!C5:C750)+SUMIF('Business Both Years'!D5:D750,"<#N/A",'Business Both
Years'!C5:C750)



"Gary''s Student" wrote:

Use a pair of SUMIF()s

=SUMIF(criteria1) + SUMIF(criteria2)
--
Gary''s Student - gsnu200747


"Sarah (OGI)" wrote:

I've written the formula below, but I'm getting a result of zero. I'm trying
to sum cells C5:C750 where cells D5:D750 are equal to either a zero or an
#N/A value.

By just specifying the zero or just specifying the #N/A, I get the correct
result, but I need to combine the two.

=SUMIF('Business Both Years'!D5:D750,"0"&"#N/A",'Business Both Years'!C5:C750)

Any ideas?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default SUMIF multiple criteria

Just subtract our first fomula from the total count of values.

=COUNTA(C5:C750)-the results of the first cell.
--
Gary''s Student - gsnu200747


"Sarah (OGI)" wrote:

Thanks for your prompt response. That works a treat!

In another cell, what would I need to enter to sum cells C5:C750 where
D5:D750 DO NOT equal zero or #N/A. When I use the following formula
(adopting the solution you suggested), the result identifies a) all the cells
in column C where cells in column D do not equal zero and b) all the cells in
column C where cells in column D do not equal #N/A, and combining the
results, i.e. it's duplicating the results because there is multiple criteria.

=SUMIF('Business Both Years'!D5:D750,"<0",'Business Both
Years'!C5:C750)+SUMIF('Business Both Years'!D5:D750,"<#N/A",'Business Both
Years'!C5:C750)



"Gary''s Student" wrote:

Use a pair of SUMIF()s

=SUMIF(criteria1) + SUMIF(criteria2)
--
Gary''s Student - gsnu200747


"Sarah (OGI)" wrote:

I've written the formula below, but I'm getting a result of zero. I'm trying
to sum cells C5:C750 where cells D5:D750 are equal to either a zero or an
#N/A value.

By just specifying the zero or just specifying the #N/A, I get the correct
result, but I need to combine the two.

=SUMIF('Business Both Years'!D5:D750,"0"&"#N/A",'Business Both Years'!C5:C750)

Any ideas?



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 128
Default SUMIF multiple criteria

That's great! - I used SUM instead of COUNTA, but I still got the desired
result, thank you!

"Gary''s Student" wrote:

Just subtract our first fomula from the total count of values.

=COUNTA(C5:C750)-the results of the first cell.
--
Gary''s Student - gsnu200747


"Sarah (OGI)" wrote:

Thanks for your prompt response. That works a treat!

In another cell, what would I need to enter to sum cells C5:C750 where
D5:D750 DO NOT equal zero or #N/A. When I use the following formula
(adopting the solution you suggested), the result identifies a) all the cells
in column C where cells in column D do not equal zero and b) all the cells in
column C where cells in column D do not equal #N/A, and combining the
results, i.e. it's duplicating the results because there is multiple criteria.

=SUMIF('Business Both Years'!D5:D750,"<0",'Business Both
Years'!C5:C750)+SUMIF('Business Both Years'!D5:D750,"<#N/A",'Business Both
Years'!C5:C750)



"Gary''s Student" wrote:

Use a pair of SUMIF()s

=SUMIF(criteria1) + SUMIF(criteria2)
--
Gary''s Student - gsnu200747


"Sarah (OGI)" wrote:

I've written the formula below, but I'm getting a result of zero. I'm trying
to sum cells C5:C750 where cells D5:D750 are equal to either a zero or an
#N/A value.

By just specifying the zero or just specifying the #N/A, I get the correct
result, but I need to combine the two.

=SUMIF('Business Both Years'!D5:D750,"0"&"#N/A",'Business Both Years'!C5:C750)

Any ideas?

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 and {multiple criteria} [email protected] Excel Discussion (Misc queries) 7 August 30th 07 05:53 PM
SUMIF WITH MULTIPLE CRITERIA Franko Excel Discussion (Misc queries) 3 December 27th 06 08:43 AM
SUMIF multiple criteria HLS Excel Discussion (Misc queries) 5 March 24th 06 03:43 PM
SUMIF With Multiple Criteria Mike Excel Worksheet Functions 1 November 2nd 05 11:08 PM
SUMIF with multiple criteria stacyjhaskins Excel Worksheet Functions 4 August 29th 05 08:22 PM


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