Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default SUMIF and list of possible critieria

How do I create a list that I can then use for SUMIF and COUNTIF formulas?

Instead of adding 10 different SUMIF formulas, I'm hoping to just reference
a list (with those 10 criteria) where only one of the list criteria has to be
satisfied.

For example, if I want to count things from MA or NY or CT, I could do three
separate COUNTIF formulas. But I'm hoping to somehow create a list (MA, NY,
CT) that I can then refer to in just one COUNTIF formula.

How do I do that?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default SUMIF and list of possible critieria

List your criteria in the range H1:H3, then:

=SUMPRODUCT(--(ISNUMBER(MATCH(A1:A10,H1:H3,0))))

Which is the equivalent of:

=COUNTIF(A1:A10,H1)+COUNTIF(A1:A10,H2)+COUNTIF(A1: A10,H3)

--
Biff
Microsoft Excel MVP


"blswes" wrote in message
...
How do I create a list that I can then use for SUMIF and COUNTIF formulas?

Instead of adding 10 different SUMIF formulas, I'm hoping to just
reference
a list (with those 10 criteria) where only one of the list criteria has to
be
satisfied.

For example, if I want to count things from MA or NY or CT, I could do
three
separate COUNTIF formulas. But I'm hoping to somehow create a list (MA,
NY,
CT) that I can then refer to in just one COUNTIF formula.

How do I do that?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default SUMIF and list of possible critieria

Just counting those states

=SUMPRODUCT(COUNTIF(C1:C10,{"MA","NY","CT"}))

summing them

=SUMPRODUCT(SUMIF(C1:C10,{"MA","NY","CT"},D1:D10))

and another criteria

=SUMPRODUCT(--(B1:B10="x"),--(ISNUMBER(MATCH(C1:C10,{"MA","NY","CT"},0))),D1:D1 0)

--
__________________________________
HTH

Bob

"blswes" wrote in message
...
How do I create a list that I can then use for SUMIF and COUNTIF formulas?

Instead of adding 10 different SUMIF formulas, I'm hoping to just
reference
a list (with those 10 criteria) where only one of the list criteria has to
be
satisfied.

For example, if I want to count things from MA or NY or CT, I could do
three
separate COUNTIF formulas. But I'm hoping to somehow create a list (MA,
NY,
CT) that I can then refer to in just one COUNTIF formula.

How do I do that?



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
Median return for multiple critieria Angela Excel Discussion (Misc queries) 5 June 18th 08 11:24 AM
Deleting Rows based on Column Critieria blackmanofsteel40 Excel Discussion (Misc queries) 1 September 7th 07 09:05 PM
Summing numbers in a list when they meet a critieria in another co Russell Excel Discussion (Misc queries) 3 February 10th 07 06:23 PM
Retrieve and group row data by multiple critieria KGosh Excel Worksheet Functions 2 September 8th 06 06:10 PM
summing data that match critieria in a rnage sandyix Excel Discussion (Misc queries) 4 February 21st 05 01:39 AM


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