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

Column d = date (mm/dd/yyyy)....column contains multiple days in month,
months in year

Column f = widget

Column h = sales force

I need a formula that will calculate the monthly number of widgets by sales
force

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Multiple conditions

Try this:

Month = 11 (November)
Widget = X
Sales force = Y

=SUMPRODUCT(--(MONTH(D1:D100)=11),--(F1:F100="X"),--(H1:H100="Y"))

--
Biff
Microsoft Excel MVP


"Curtis" wrote in message
...
Column d = date (mm/dd/yyyy)....column contains multiple days in month,
months in year

Column f = widget

Column h = sales force

I need a formula that will calculate the monthly number of widgets by
sales
force

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 33
Default Multiple conditions

Please forgive the somewhat newbie question, but in the formula below, what
are the two dashes for after the open parenthesis following sumproduct?

"T. Valko" wrote:

Try this:

Month = 11 (November)
Widget = X
Sales force = Y

=SUMPRODUCT(--(MONTH(D1:D100)=11),--(F1:F100="X"),--(H1:H100="Y"))

--
Biff
Microsoft Excel MVP


"Curtis" wrote in message
...
Column d = date (mm/dd/yyyy)....column contains multiple days in month,
months in year

Column f = widget

Column h = sales force

I need a formula that will calculate the monthly number of widgets by
sales
force

Thanks




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Multiple conditions

=SUMPRODUCT(--(MONTH(D1:D100)=11),--(F1:F100="X"),--(H1:H100="Y"))

Each of these logical expressions will return an array of either TRUE or
FALSE:

(MONTH(D1:D100)=11)
(F1:F100="X")
(H1:H100="Y")

SUMPRODUCT works with numbers so we need to convert those TRUEs and FALSEs
to numbers. One way to do that is to use the "--".

The "--" coerces the TRUE to 1 and FALSE to 0.

Then, all 3 arrays are multiplied together and summed which gives us the
result of the formula. In this case, the result is a count.

It would look something like this:

1*1*1=1
0*1*1=0
1*0*0=0
1*1*1=1
1*1*0=0
0*0*0=0

=SUMPRODUCT({1;0;0;1;0;0}) = 2

See this for a comprehensive explanation of SUMPRODUCT:

http://xldynamic.com/source/xld.SUMPRODUCT.html


--
Biff
Microsoft Excel MVP


"Lawrence" wrote in message
...
Please forgive the somewhat newbie question, but in the formula below,
what
are the two dashes for after the open parenthesis following sumproduct?

"T. Valko" wrote:

Try this:

Month = 11 (November)
Widget = X
Sales force = Y

=SUMPRODUCT(--(MONTH(D1:D100)=11),--(F1:F100="X"),--(H1:H100="Y"))

--
Biff
Microsoft Excel MVP


"Curtis" wrote in message
...
Column d = date (mm/dd/yyyy)....column contains multiple days in month,
months in year

Column f = widget

Column h = sales force

I need a formula that will calculate the monthly number of widgets by
sales
force

Thanks






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 33
Default Multiple conditions

Thanks so much!! you helped me simplify a formula I created on my spreadsheet!

"T. Valko" wrote:

=SUMPRODUCT(--(MONTH(D1:D100)=11),--(F1:F100="X"),--(H1:H100="Y"))

Each of these logical expressions will return an array of either TRUE or
FALSE:

(MONTH(D1:D100)=11)
(F1:F100="X")
(H1:H100="Y")

SUMPRODUCT works with numbers so we need to convert those TRUEs and FALSEs
to numbers. One way to do that is to use the "--".

The "--" coerces the TRUE to 1 and FALSE to 0.

Then, all 3 arrays are multiplied together and summed which gives us the
result of the formula. In this case, the result is a count.

It would look something like this:

1*1*1=1
0*1*1=0
1*0*0=0
1*1*1=1
1*1*0=0
0*0*0=0

=SUMPRODUCT({1;0;0;1;0;0}) = 2

See this for a comprehensive explanation of SUMPRODUCT:

http://xldynamic.com/source/xld.SUMPRODUCT.html


--
Biff
Microsoft Excel MVP


"Lawrence" wrote in message
...
Please forgive the somewhat newbie question, but in the formula below,
what
are the two dashes for after the open parenthesis following sumproduct?

"T. Valko" wrote:

Try this:

Month = 11 (November)
Widget = X
Sales force = Y

=SUMPRODUCT(--(MONTH(D1:D100)=11),--(F1:F100="X"),--(H1:H100="Y"))

--
Biff
Microsoft Excel MVP


"Curtis" wrote in message
...
Column d = date (mm/dd/yyyy)....column contains multiple days in month,
months in year

Column f = widget

Column h = sales force

I need a formula that will calculate the monthly number of widgets by
sales
force

Thanks








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Multiple conditions

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Lawrence" wrote in message
...
Thanks so much!! you helped me simplify a formula I created on my
spreadsheet!

"T. Valko" wrote:

=SUMPRODUCT(--(MONTH(D1:D100)=11),--(F1:F100="X"),--(H1:H100="Y"))

Each of these logical expressions will return an array of either TRUE or
FALSE:

(MONTH(D1:D100)=11)
(F1:F100="X")
(H1:H100="Y")

SUMPRODUCT works with numbers so we need to convert those TRUEs and
FALSEs
to numbers. One way to do that is to use the "--".

The "--" coerces the TRUE to 1 and FALSE to 0.

Then, all 3 arrays are multiplied together and summed which gives us the
result of the formula. In this case, the result is a count.

It would look something like this:

1*1*1=1
0*1*1=0
1*0*0=0
1*1*1=1
1*1*0=0
0*0*0=0

=SUMPRODUCT({1;0;0;1;0;0}) = 2

See this for a comprehensive explanation of SUMPRODUCT:

http://xldynamic.com/source/xld.SUMPRODUCT.html


--
Biff
Microsoft Excel MVP


"Lawrence" wrote in message
...
Please forgive the somewhat newbie question, but in the formula below,
what
are the two dashes for after the open parenthesis following sumproduct?

"T. Valko" wrote:

Try this:

Month = 11 (November)
Widget = X
Sales force = Y

=SUMPRODUCT(--(MONTH(D1:D100)=11),--(F1:F100="X"),--(H1:H100="Y"))

--
Biff
Microsoft Excel MVP


"Curtis" wrote in message
...
Column d = date (mm/dd/yyyy)....column contains multiple days in
month,
months in year

Column f = widget

Column h = sales force

I need a formula that will calculate the monthly number of widgets
by
sales
force

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
SUMPRODUCT or INDEX/MATCH for multiple conditions and multiple rec TravisB Excel Discussion (Misc queries) 21 March 16th 07 09:49 PM
How do I add multiple values that match multiple conditions? Joel Excel Discussion (Misc queries) 5 April 10th 06 01:32 PM
Multiple conditions and multiple return values Minerva Excel Worksheet Functions 3 February 16th 06 06:57 AM
Combining Text from multiple cells under multiple conditions KNS Excel Worksheet Functions 2 June 15th 05 11:00 PM
How to multiple conditions to validate more than 2 conditions to . Bhuvana Govind Excel Worksheet Functions 1 January 28th 05 07:07 PM


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