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

Hi all,

Eg below
A B C
1 apples black $500
2 apples pink $200
3 orange black $100
4 apples black $250
5 pear yellow $300

If I want to add the corresponding values in column C for those apples that
are black (note that there are pink and black apples), what is the formula I
should use? Effectively, this means 2 criterias (column A and B) have to be
met before Excel will add their values (in column C) in the cell that I keyed
in the formula.

Thanks!


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default more than 1 criteria

Try this:

=SUMPRODUCT(--(A1:A5="apples"),--(B1:B5="black"),C1:C5)

Better to use cells to hold the criteria:

E1 = apples
F1 = black

=SUMPRODUCT(--(A1:A5=E1),--(B1:B5=F1),C1:C5)



--
Biff
Microsoft Excel MVP


"Chiam" wrote in message
...
Hi all,

Eg below
A B C
1 apples black $500
2 apples pink $200
3 orange black $100
4 apples black $250
5 pear yellow $300

If I want to add the corresponding values in column C for those apples
that
are black (note that there are pink and black apples), what is the formula
I
should use? Effectively, this means 2 criterias (column A and B) have to
be
met before Excel will add their values (in column C) in the cell that I
keyed
in the formula.

Thanks!




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default more than 1 criteria

Try this...

=SUMPRODUCT((A1:A1000="apples")*(B1:B1000="black") *C1:C1000)

Rick


"Chiam" wrote in message
...
Hi all,

Eg below
A B C
1 apples black $500
2 apples pink $200
3 orange black $100
4 apples black $250
5 pear yellow $300

If I want to add the corresponding values in column C for those apples
that
are black (note that there are pink and black apples), what is the formula
I
should use? Effectively, this means 2 criterias (column A and B) have to
be
met before Excel will add their values (in column C) in the cell that I
keyed
in the formula.

Thanks!



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
=DMIN(database,field,criteria) question about criteria Dummy Excel Discussion (Misc queries) 2 April 16th 07 08:02 PM
Countif using format criteria not number criteria? Rumbla76 Excel Worksheet Functions 1 April 20th 05 05:38 AM
Countif using format criteria....not number criteria? Troy Excel Worksheet Functions 1 April 20th 05 04:50 AM
Counting Cells with multiple criteria.One criteria supporting wild Azhar Saleem Excel Worksheet Functions 1 January 12th 05 10:54 AM
Counting Cells with multiple criteria.One criteria supporting wild Azhar Arain Excel Worksheet Functions 1 January 12th 05 08:33 AM


All times are GMT +1. The time now is 12:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"