Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 54
Default Is SUMPRODUCT the right function to use?

I need help with a formula to add a result based on multiple criteria: If a
particular criteria (equal to L14) is met in c2:c1180, then check J2:j1180
for items starting with "m", and/or "n" and add the total quantities
together.
I know that the answer should be 7, as the countif function has told me that
the criteria in L14 shows up 7 times in C2:c1180.
I've attempted the following formula, but it returns a 3, which is equal to
"m" only.
=SUMPRODUCT((C2:C1180=L14)*(LEFT(J2:J1180)="m")+SU MPRODUCT(C2:C1180=L14)*(LEFT(J2:J1180)="d"))
I would really welcome assistance to advance my comprehension of the
complexities of formula writing.
Secondly, what specifically does the -- mean?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 57
Default Is SUMPRODUCT the right function to use?

Hi

you would need to change that form of the formula to
=SUMPRODUCT((C2:C1180=L14)*(LEFT(J2:J1180)="m"))+
SUMPRODUCT((C2:C1180=L14)*(LEFT(J2:J1180)="d"))

You only had an outer set of parentheses to the overall formula, as opposed
to each Sumproduct function

Alternatively, you could use
=SUMPRODUCT((C2:C1180=L14)*(LEFT(J2:J1180)={"m","d "}))

For more help on Sumproduct, including what the double unary minus -- does,
take a look at Bob Phillips excellent discussion document at

http://www.xldynamic.com/source/xld.SUMPRODUCT.html
--
Regards
Roger Govier



"Twishlist" wrote in message
...
I need help with a formula to add a result based on multiple criteria: If a
particular criteria (equal to L14) is met in c2:c1180, then check J2:j1180
for items starting with "m", and/or "n" and add the total quantities
together.
I know that the answer should be 7, as the countif function has told me
that
the criteria in L14 shows up 7 times in C2:c1180.
I've attempted the following formula, but it returns a 3, which is equal
to
"m" only.
=SUMPRODUCT((C2:C1180=L14)*(LEFT(J2:J1180)="m")+SU MPRODUCT(C2:C1180=L14)*(LEFT(J2:J1180)="d"))
I would really welcome assistance to advance my comprehension of the
complexities of formula writing.
Secondly, what specifically does the -- mean?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 54
Default Is SUMPRODUCT the right function to use?

Thank you so much!...I'll now go and check out the xldynamic website for
other useful info.

"Roger Govier" wrote:

Hi

you would need to change that form of the formula to
=SUMPRODUCT((C2:C1180=L14)*(LEFT(J2:J1180)="m"))+
SUMPRODUCT((C2:C1180=L14)*(LEFT(J2:J1180)="d"))

You only had an outer set of parentheses to the overall formula, as opposed
to each Sumproduct function

Alternatively, you could use
=SUMPRODUCT((C2:C1180=L14)*(LEFT(J2:J1180)={"m","d "}))

For more help on Sumproduct, including what the double unary minus -- does,
take a look at Bob Phillips excellent discussion document at

http://www.xldynamic.com/source/xld.SUMPRODUCT.html
--
Regards
Roger Govier



"Twishlist" wrote in message
...
I need help with a formula to add a result based on multiple criteria: If a
particular criteria (equal to L14) is met in c2:c1180, then check J2:j1180
for items starting with "m", and/or "n" and add the total quantities
together.
I know that the answer should be 7, as the countif function has told me
that
the criteria in L14 shows up 7 times in C2:c1180.
I've attempted the following formula, but it returns a 3, which is equal
to
"m" only.
=SUMPRODUCT((C2:C1180=L14)*(LEFT(J2:J1180)="m")+SU MPRODUCT(C2:C1180=L14)*(LEFT(J2:J1180)="d"))
I would really welcome assistance to advance my comprehension of the
complexities of formula writing.
Secondly, what specifically does the -- mean?




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Is SUMPRODUCT the right function to use?

=SUMPRODUCT((C2:C1180=L14)*(LEFT(J2:J1180,1)="m")) +
SUMPRODUCT((C2:C1180=L14)*(LEFT(J2:J1180,1)="n"))

The -- is a double unary operation that can convert an array of TRUE / FALSE
values to numerics. It isn't really needed with the way you have built your
formulas, with each multiplying two arrays of TRUE / FALSE values, which
will convert the results to numeric values.

HTH,
Bernie
MS Excel MVP



"Twishlist" wrote in message
...
I need help with a formula to add a result based on multiple criteria: If a
particular criteria (equal to L14) is met in c2:c1180, then check J2:j1180
for items starting with "m", and/or "n" and add the total quantities
together.
I know that the answer should be 7, as the countif function has told me
that
the criteria in L14 shows up 7 times in C2:c1180.
I've attempted the following formula, but it returns a 3, which is equal
to
"m" only.
=SUMPRODUCT((C2:C1180=L14)*(LEFT(J2:J1180)="m")+SU MPRODUCT(C2:C1180=L14)*(LEFT(J2:J1180)="d"))
I would really welcome assistance to advance my comprehension of the
complexities of formula writing.
Secondly, what specifically does the -- mean?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 54
Default Is SUMPRODUCT the right function to use?

It's invaluable having assistance from people such as yourselves who know the
product so thoroughly...thanks heaps.

"Bernie Deitrick" wrote:

=SUMPRODUCT((C2:C1180=L14)*(LEFT(J2:J1180,1)="m")) +
SUMPRODUCT((C2:C1180=L14)*(LEFT(J2:J1180,1)="n"))

The -- is a double unary operation that can convert an array of TRUE / FALSE
values to numerics. It isn't really needed with the way you have built your
formulas, with each multiplying two arrays of TRUE / FALSE values, which
will convert the results to numeric values.

HTH,
Bernie
MS Excel MVP



"Twishlist" wrote in message
...
I need help with a formula to add a result based on multiple criteria: If a
particular criteria (equal to L14) is met in c2:c1180, then check J2:j1180
for items starting with "m", and/or "n" and add the total quantities
together.
I know that the answer should be 7, as the countif function has told me
that
the criteria in L14 shows up 7 times in C2:c1180.
I've attempted the following formula, but it returns a 3, which is equal
to
"m" only.
=SUMPRODUCT((C2:C1180=L14)*(LEFT(J2:J1180)="m")+SU MPRODUCT(C2:C1180=L14)*(LEFT(J2:J1180)="d"))
I would really welcome assistance to advance my comprehension of the
complexities of formula writing.
Secondly, what specifically does the -- mean?






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
Help on sumproduct function sadat Excel Worksheet Functions 8 June 6th 07 11:19 AM
Sumproduct function Peter Excel Discussion (Misc queries) 10 February 5th 07 11:24 AM
Sumproduct Function JimMay Excel Discussion (Misc queries) 3 June 17th 06 11:24 PM
use of sumproduct function R..VENKATARAMAN Excel Worksheet Functions 4 January 23rd 06 02:33 AM
SUMIF Function Inside SUMPRODUCT Function Abdul Waheed Excel Worksheet Functions 17 September 19th 05 04:24 PM


All times are GMT +1. The time now is 09:42 AM.

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"