Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default sumif and countif nested?

I need to be able to find the number of occurrence of certain type of
product sold at a certain price.

eg.
I have 2 columns.

Col A = Product Code
Col B = Selling Price

Prd Code Price
2 £1.00
9 £62.00
13 £5.00
17 £5.00
17 £5.00
17 £124.00
17 £62.00
17 £62.00
17 £5.00
18 £5.00
20 £5.00
20 £5.00
21 £62.00
21 £5.00
21 £62.00
21 £5.00
21 £5.00
21 £62.00
21 £5.00
21 £5.00
21 £62.00
21 £62.00
22 £5.00
22 £5.00
22 £5.00
22 £62.00
22 £5.00
22 £63.00
22 £5.00
22 £62.00
22 £5.00
22 £62.00
22 £5.00
22 £5.00
22 £5.00
22 £62.00
22 £5.00
24 £62.00
24 £62.00
24 £5.00

I need to be able to find how many of 22 are sold at £62, £5 and how
many of 17 are sold at £62, £5 etc.

is there an equation to solve this? I could only use countif to count
the total number of products that are sold at £62, £1,£5 etc but I
dont know how many of 22 are sold at £5, how many 17 are sold at £5.

thanks.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default sumif and countif nested?

Let's assume A1 and B1 have text (labels) and the data is in A2:B41
To COUNT how many entries have Code of 22 and Price of 5 use this formula
=SUMPRODUCT(--(A2:A41=22),--(B2:B41=5))
You could use cell references as =SUMPRODUCT(--(A2:A41=D1),--(B2:B41=E1))
You cannot use full columns as in =SUMPRODUCT(--(A:A=22),--(B:B=5))
For more on SUMPRODUCT see
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
http://mcgimpsey.com/excel/formulae/doubleneg.html
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

wrote in message
ups.com...
I need to be able to find the number of occurrence of certain type of
product sold at a certain price.

eg.
I have 2 columns.

Col A = Product Code
Col B = Selling Price

Prd Code Price
2 £1.00
9 £62.00
13 £5.00
17 £5.00
17 £5.00
17 £124.00
17 £62.00
17 £62.00
17 £5.00
18 £5.00
20 £5.00
20 £5.00
21 £62.00
21 £5.00
21 £62.00
21 £5.00
21 £5.00
21 £62.00
21 £5.00
21 £5.00
21 £62.00
21 £62.00
22 £5.00
22 £5.00
22 £5.00
22 £62.00
22 £5.00
22 £63.00
22 £5.00
22 £62.00
22 £5.00
22 £62.00
22 £5.00
22 £5.00
22 £5.00
22 £62.00
22 £5.00
24 £62.00
24 £62.00
24 £5.00

I need to be able to find how many of 22 are sold at £62, £5 and how
many of 17 are sold at £62, £5 etc.

is there an equation to solve this? I could only use countif to count
the total number of products that are sold at £62, £1,£5 etc but I
dont know how many of 22 are sold at £5, how many 17 are sold at £5.

thanks.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 492
Default sumif and countif nested?

=SUMPRODUCT(--(A1:A100=22),--(B1:B100=62))
You can have the '22' and '62' in two cells, say C1 and D1,
=SUMPRODUCT(--(A1:A100=C1),--(B1:B100=D1))
then you can get different results by changing those two cells and not have
to edit the formula,
Regards,
Alan.
wrote in message
ups.com...
I need to be able to find the number of occurrence of certain type of
product sold at a certain price.

eg.
I have 2 columns.

Col A = Product Code
Col B = Selling Price

Prd Code Price
2 £1.00
9 £62.00
13 £5.00
17 £5.00
17 £5.00
17 £124.00
17 £62.00
17 £62.00
17 £5.00
18 £5.00
20 £5.00
20 £5.00
21 £62.00
21 £5.00
21 £62.00
21 £5.00
21 £5.00
21 £62.00
21 £5.00
21 £5.00
21 £62.00
21 £62.00
22 £5.00
22 £5.00
22 £5.00
22 £62.00
22 £5.00
22 £63.00
22 £5.00
22 £62.00
22 £5.00
22 £62.00
22 £5.00
22 £5.00
22 £5.00
22 £62.00
22 £5.00
24 £62.00
24 £62.00
24 £5.00

I need to be able to find how many of 22 are sold at £62, £5 and how
many of 17 are sold at £62, £5 etc.

is there an equation to solve this? I could only use countif to count
the total number of products that are sold at £62, £1,£5 etc but I
dont know how many of 22 are sold at £5, how many 17 are sold at £5.

thanks.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default sumif and countif nested?

Thanks guys!! its very useful! just what i want to do!

Alan wrote:

=SUMPRODUCT(--(A1:A100=22),--(B1:B100=62))
You can have the '22' and '62' in two cells, say C1 and D1,
=SUMPRODUCT(--(A1:A100=C1),--(B1:B100=D1))
then you can get different results by changing those two cells and not have
to edit the formula,
Regards,
Alan.
wrote in message
ups.com...
I need to be able to find the number of occurrence of certain type of
product sold at a certain price.

eg.
I have 2 columns.

Col A = Product Code
Col B = Selling Price

Prd Code Price
2 £1.00
9 £62.00
13 £5.00
17 £5.00
17 £5.00
17 £124.00
17 £62.00
17 £62.00
17 £5.00
18 £5.00
20 £5.00
20 £5.00
21 £62.00
21 £5.00
21 £62.00
21 £5.00
21 £5.00
21 £62.00
21 £5.00
21 £5.00
21 £62.00
21 £62.00
22 £5.00
22 £5.00
22 £5.00
22 £62.00
22 £5.00
22 £63.00
22 £5.00
22 £62.00
22 £5.00
22 £62.00
22 £5.00
22 £5.00
22 £5.00
22 £62.00
22 £5.00
24 £62.00
24 £62.00
24 £5.00

I need to be able to find how many of 22 are sold at £62, £5 and how
many of 17 are sold at £62, £5 etc.

is there an equation to solve this? I could only use countif to count
the total number of products that are sold at £62, £1,£5 etc but I
dont know how many of 22 are sold at £5, how many 17 are sold at £5.

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
Forget SUMIF, COUNTIF and VLOOKUP Pierre Leclerc Excel Worksheet Functions 16 April 27th 23 11:51 AM
How do I set up a countif, or sumif that is multiconditional? Mr. Yanni Excel Worksheet Functions 9 June 21st 06 09:17 AM
problems with sumif and countif Simon Shaw Excel Discussion (Misc queries) 6 July 23rd 05 10:02 PM
Reference Cells with Sumif or Countif GK New Users to Excel 1 May 3rd 05 06:21 PM
Modify SUMIF and COUNTIF to work with SUBTOTALS SSHO_99 Excel Worksheet Functions 2 November 12th 04 11:36 PM


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