# Sum the data between two data column

#### tta013

##### New Member
Hi all,

Hope you are all well. I have a slight challenge.
Basically I have a sheet (Unit) with following which show how many units we have in a given date range.

Product, Start Date, End Date, Unit
A 01/02/2012 06/02/2012 3
A 31/01/2012 04/02/2012 3
B 03/02/2012 18/02/2012 3
A 05/02/2012 11/02/2012 3
A 01/02/2012 03/02/2012 3

On the second sheet,
I have a row with all the dates

Product 01/02/2012 02/02/2012 03/02/2012 04/02/2012 05/02/2012
A
What I would like to to have a unit sum for each date for each Product so that I know how many units i have processed each day. So Ideally , the data would show something like
01/02/2012 02/02/2012 03/02/2012 04/02/2012 05/02/2012 06/02/2012
A 9 9 9 6 6 6
B 3 3 3 3 3 3
------
I tried doing like below but in vain.
=SUMPRODUCT(--(Units!\$B\$2:\$B\$1000=\$A7),--(Units!\$D\$2:\$D\$1000=BP\$3),--(BP\$3<Units!\$E\$2:\$E\$1000)*(Units!\$G\$2:\$G\$1000))

Products - \$B\$2:\$B\$1000
Start Date - \$D\$2:\$D\$1000
End Date - \$E\$2:\$E\$1000
Unit - \$G\$2:\$G\$1000

I am just wondering if a guru out there can help please?

Thanks

### Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
This would not give accurate results based on your input data.

You have 3 Product A for 01/02/2012 to 06/02/12

All 3 on 01/02/2012
2 on 01/02/2012 and 1 on 04/02/2012
1 on 02, 04, 06/12/2012

TRY THIS

Excel Workbook
ABCDEFGH
1A01/02/201206/02/20123
2A31/01/201204/02/20123
3B03/02/201218/02/20123
4A05/02/201211/02/20123
5A01/02/201203/02/20123
6
7
801/02/201202/02/201203/02/201204/02/201204/02/201205/02/201206/02/2012
9A9333330
10B3330000
Sheet1

Hi there,

=SUMPRODUCT(--(\$B\$1:\$B\$5>=B\$8)*(\$A\$1:\$A\$5=\$A9)*(\$D\$1:\$D\$5)) wouldn't give the correct.

We need to check columns C to make sure the date we are checking is in BETWEEN.

Thanks

Replies
4
Views
198
Replies
12
Views
403
Replies
3
Views
259
Replies
5
Views
599
Replies
2
Views
180

1,203,102
Messages
6,053,538
Members
444,670
Latest member
laurenmjones1111

### 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.

### Which adblocker are you using?

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

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