Sumproduct and Lookup

gary_parker

New Member
Joined
Jul 24, 2005
Messages
48
Hi

Looking to create a formula that shows a weekly summary of each of the products within a table.

I'm currently using a SUMPRODUCT formula as follows

=SUMPRODUCT(('Scheduled Cancellations'!$A$3:$A$699>=$B5)*('Scheduled Cancellations'!$A$3:$A$699<=$C5)*('Scheduled Cancellations'!$B$3:$D$699))

$B5 and $C5 both relate to a date formula that takes first date of the week (monday) and date+7

What i'd like to do, is encorporate a lookup into the above sum product that takes away the association of set cells as currently I have to sort by column to arrange the cells in alphabetical format (product 1 is not naturally called product 1)
 
Last edited:

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Hi

Looking to create a formula that shows a weekly summary of each of the products within a table.

I'm currently using a SUMPRODUCT formula as follows

=SUMPRODUCT(('Scheduled Cancellations'!$A$3:$A$699>=$B5)*('Scheduled Cancellations'!$A$3:$A$699<=$C5)*('Scheduled Cancellations'!$B$3:$D$699))

$B5 and $C5 both relate to a date formula that takes first date of the week (monday) and date+7

What i'd like to do, is encorporate a lookup into the above sum product that takes away the association of set cells as currently I have to sort by column to arrange the cells in alphabetical format (product 1 is not naturally called product 1)
encorporate a lookup into the above sum product
A lookup for what?

And, lookup where?

We're going to need more info!
 
Upvote 0
Apologies

I had attempted to load an image into the posting, which was removed for some reason.

Table should be here

unledjsr.jpg


The sumproduct is located within a summary table that matches between two set dates ($b5 and $c5 in formula)

Therefore, the summary table for Product 1 between 11th and 17th Jan 2010 would have been 372 cancellations

What I want the formula to do is change the need for columns B-D to be product 1 and have the sumproduct formula lookup the name product 1 and do the sums

Hope that is clearer with example.
 
Upvote 0
Assuming you have data up to column Z (change as required) try

=SUMPRODUCT(('Scheduled Cancellations'!$A$3:$A$699>=$B5)*('Scheduled Cancellations'!$A$3:$A$699<=$C5)*('Scheduled Cancellations'!$B$2:$Z$2="Product 1"),'Scheduled Cancellations'!$B$3:$Z$699)

You can replace "Product 1" in the formula with a relevant cell reference.....
 
Upvote 0
Apologies

I had attempted to load an image into the posting, which was removed for some reason.

Table should be here

unledjsr.jpg


The sumproduct is located within a summary table that matches between two set dates ($b5 and $c5 in formula)

Therefore, the summary table for Product 1 between 11th and 17th Jan 2010 would have been 372 cancellations

What I want the formula to do is change the need for columns B-D to be product 1 and have the sumproduct formula lookup the name product 1 and do the sums

Hope that is clearer with example.
Ok, now I think I understand...

Try this...

=SUMPRODUCT(('Scheduled Cancellations'!$A$3:$A$699>=$B5)*('Scheduled Cancellations'!$A$3:$A$699<=$C5)*('Scheduled Cancellations'!B2:D2="Product 1")*'Scheduled Cancellations'!$B$3:$D$699)
 
Upvote 0
T. Valko, i've found that Barry Houdinis example works, I think due to the lack of the * on the final criteria. Both, thanks for the insight on this, its been most helpful.

On a separate note, but related to the same problem. How can (if at all) the formula be developed to exclude those that are classed as "Additional" cancellations and focus only on the addition of "Expected+Actual"

Thanks
 
Upvote 0
T. Valko, i've found that Barry Houdinis example works, I think due to the lack of the * on the final criteria.
If there is any non-numeric data in the sum range then the syntax I suggested will return a #VALUE! error.

On a separate note, but related to the same problem. How can (if at all) the formula be developed to exclude those that are classed as "Additional" cancellations and focus only on the addition of "Expected+Actual"

Thanks
With your data in the range A1:G20...

Use cells to hold the criteria:
  • I2 = lower date boundary = 1/11/2010
  • J2 = upper date boundary = 1/17/2010
  • K2 = Product 1
  • L2 = Expected
  • M2 = Actual
Then:

=SUMPRODUCT((A3:A20>=I2)*(A3:A20<=J2)*(B2:G2=K2)*(ISNUMBER(MATCH(B1:G1,L2:M2,0))),B3:G20)
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,750
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top