Adding the total quantity of Items between suggested start Dates and Time THEN end Dates and Time.

BbdHome2012

New Member
Joined
Aug 11, 2012
Messages
49
Hi Mr Excel User,

Ive had this problem for a while and at 1 point seem to have it solved until it simply just stopped working(I have samples if anyone needs)

I want to workout the qty of products sold between a period of 2 times and 2 dates that I inputted in a different cell

The name of the products are listed in (column A). The Qty of each product sold on that date and time is listed in (column B). While the dates is in (Column C)(earliest date at the top) and time is in (Column D)(earliest time from that date at the top).

Once I input the start time (G3) and start date (H3) in different cells then the end time (I3) and end date (J3)

I get the total added of each of the products between the dates and times I just inputted.

I tried using =SUMPRODUCT, here is an example of string I used:

=SUMPRODUCT(($B$5:$B$39),--($C$5:$C$39>=StartDate),--($C$5:$C$39<=EndDate),--($D$5:$D$39<=StartTime),--($D$5:$D$39<=EndTime),--($A$5:$A$39=G6))

Hope someone can help me, ask me for more information if needed

Thank you inadvance,

Bbdhome
 
Last edited:

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Your dates and times shown in H & I are both the same date/time values. They just appear different by virtue of formatting.
Alternatively, your Start and End dates and times are split. i.e. Integer for date and decimal fraction for time.

So with that existing setup you will need.......

Excel 2007
ABCD
1STARTEND
2TimeDateTimeDate
300:36:0131/05/201510:41:4631/05/2015
4
5
6
7
8Crystalline Carbonide21
9Fermionic Condensates0
10Fernite Carbide32
11Ferrogel0
12Fullerides0
13Hypersynaptic Fibers2
sample 1
Cell Formulas
RangeFormula
C8=SUMPRODUCT(($G$4:$G$53)*($H$4:$H$53>=StartDate+StartTime)*($H$4:$H$53<=EndDate+EndTime)*($F$4:$F$53=A8))
Named Ranges
NameRefers ToCells
EndDate='sample 1'!$D$3
EndTime='sample 1'!$C$3
StartDate='sample 1'!$B$3
StartTime='sample 1'!$A$3


Time for bed where I am.
 
Upvote 0
MorningSnakehips

Once again, youre an absolute Gem. With 3706 count me as one of your happy customers(who doesn't pay) lol.

Really appreciate your responses and late help.

Bbdhome,

o/
 
Upvote 0

Forum statistics

Threads
1,215,200
Messages
6,123,611
Members
449,109
Latest member
Sebas8956

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