Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Counting occurances based on multiple variables

I have a range of cells that hold 4 possible entries and another range that
holds 3 possible entries. Is it possible to COUNTIF/SUMPRODUCT if you for
more than one possibile entry in a cell range?

Here's an example:

Corp Sales 15
Corp Retrn 20
Corp Excha 20
Corp Retrn 0
Corp Excha 15

I want to count the number of occurances when column B reads either Retrn or
Excha and column C reads 15 or 20. In this case, the formula would return 3.

Any help would be appreciated...
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Counting occurances based on multiple variables

Something structured like this:

=SUMPRODUCT(--((B2:B100="Retrn")+(B2:B100="Excha")),--((C2:C100=15)+(C2:C100=20)))
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"DSKR" wrote:

I have a range of cells that hold 4 possible entries and another range that
holds 3 possible entries. Is it possible to COUNTIF/SUMPRODUCT if you for
more than one possibile entry in a cell range?

Here's an example:

Corp Sales 15
Corp Retrn 20
Corp Excha 20
Corp Retrn 0
Corp Excha 15

I want to count the number of occurances when column B reads either Retrn or
Excha and column C reads 15 or 20. In this case, the formula would return 3.

Any help would be appreciated...

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Counting occurances based on multiple variables

Try this:

=SUMPRODUCT(--(ISNUMBER(MATCH(B1:B5,{"Retrn","Excha"},0))),--(ISNUMBER(MATCH(C1:C5,{15,20},0))))

--
Biff
Microsoft Excel MVP


"DSKR" wrote in message
...
I have a range of cells that hold 4 possible entries and another range that
holds 3 possible entries. Is it possible to COUNTIF/SUMPRODUCT if you for
more than one possibile entry in a cell range?

Here's an example:

Corp Sales 15
Corp Retrn 20
Corp Excha 20
Corp Retrn 0
Corp Excha 15

I want to count the number of occurances when column B reads either Retrn
or
Excha and column C reads 15 or 20. In this case, the formula would return
3.

Any help would be appreciated...



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Counting occurances based on multiple variables

=SUMPRODUCT(--((B2:B100="Retrn")+(B2:B100="Excha")),--((C2:C100=15)+(C2:C100=20)))

No need for the double unary:

=SUMPRODUCT((B2:B100="Retrn")+(B2:B100="Excha"),(C 2:C100=15)+(C2:C100=20))

--
Biff
Microsoft Excel MVP


"Luke M" wrote in message
...
Something structured like this:

=SUMPRODUCT(--((B2:B100="Retrn")+(B2:B100="Excha")),--((C2:C100=15)+(C2:C100=20)))
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"DSKR" wrote:

I have a range of cells that hold 4 possible entries and another range
that
holds 3 possible entries. Is it possible to COUNTIF/SUMPRODUCT if you
for
more than one possibile entry in a cell range?

Here's an example:

Corp Sales 15
Corp Retrn 20
Corp Excha 20
Corp Retrn 0
Corp Excha 15

I want to count the number of occurances when column B reads either Retrn
or
Excha and column C reads 15 or 20. In this case, the formula would
return 3.

Any help would be appreciated...



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Counting occurances based on multiple variables

Thanks!!!!!

"Luke M" wrote:

Something structured like this:

=SUMPRODUCT(--((B2:B100="Retrn")+(B2:B100="Excha")),--((C2:C100=15)+(C2:C100=20)))
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"DSKR" wrote:

I have a range of cells that hold 4 possible entries and another range that
holds 3 possible entries. Is it possible to COUNTIF/SUMPRODUCT if you for
more than one possibile entry in a cell range?

Here's an example:

Corp Sales 15
Corp Retrn 20
Corp Excha 20
Corp Retrn 0
Corp Excha 15

I want to count the number of occurances when column B reads either Retrn or
Excha and column C reads 15 or 20. In this case, the formula would return 3.

Any help would be appreciated...

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
counting ranges with multiple variables GAIDEN Excel Worksheet Functions 2 October 3rd 08 04:26 PM
Formula for counting multiple variables in a spreadsheet smorgan Excel Worksheet Functions 6 February 25th 06 05:10 AM
Counting multiple variables returns #VALUE was Excel Discussion (Misc queries) 1 August 12th 05 02:13 AM
counting based ona number of variables. vipa2000 Excel Worksheet Functions 11 July 29th 05 04:08 PM
Counting multiple occurances of a specific string BaseballFan Excel Worksheet Functions 1 February 26th 05 08:34 PM


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