Formula needed to track the number of times each customer picked up 4 or more parcels on the preferred pick up day within a given time frame

Help101

New Member
Joined
Apr 24, 2014
Messages
30
Hi Everyone,

We have a daily log of the number of parcels picked up by our customers. The number of parcels to be picked up ranges from 0 to a maximum of 5 per day.

Customers are each assigned a pick-up day (Column C) if they are picking up 4 or more parcels. Row 1 shows the date the parcels are picked up and Row 2 shows the week day corresponding to the pick-up dates.

Our challenge is that customers do not always follow their pick-up dates for 4 or more parcels. We would like to track (Column Z) and reward our customers who complied with their pick-up dates for 4 or more parcels from June 14th to June 16th (Column G to Column S).

We have more than 10 customers so counting manually is very challenging. I have reviewed online tutorials on this but it seems that the COUNTIFS function only works if the variables tracked are found in columns. Our records are in rows.

Thanks for the help.

Help101

June 1June 2June 3June 4June 5June 6June 7June 8June 9June 10June 11June 12June 13June 14June 15June 16June 17June 18June 19June 20June 21June 22
CustomerPreferred Pick-up Day7123456712345671234567Number of Time Customer Picked Up 4 or more Parcels on Preferred Pick-up Day
1Customer 135204230252421001123402
2Customer 252124051431021254344033
3Customer 321105032330140124415401
4Customer 470324503205540015012550
5Customer 522112054413454245021420
6Customer 613310044115341410101145
7Customer 731125303125343302414505
8Customer 861143040043444301503243
9Customer 922221050221124443124020
10Customer 1051104435140253331151105

<tbody>
</tbody>

****** id="cke_pastebin" style="position: absolute; top: 660px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">
10503233

<tbody>
</tbody>
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hi Help,

Pls disregard post 2#

Hi,

You'll need to use the date formula to give you real June dates from 01-06-19, then you can format them as mmm-dd if you want Month / Day like your sample.

(Column G to Column S) Should mean 05-06-19 to 17-06-19 which is ok because you can change the Start & End date or the Parcel starting qty with the following;


Book1
ABCDEXYZAAAB
101-06-1902-06-19Jun-03Jun-2205-06-1917-06-194
2CustomerPreferred7127
3Customer 1352021
4Customer 2521231
5Customer 3211011
6Customer 4703200
7Customer 5221100
8Customer 6133150
9Customer 7311250
10Customer 8611430
11Customer 9222200
12Customer 10511050
Sheet1
Cell Formulas
RangeFormula
D1=C1+1
Z3=SUMPRODUCT(($C$1:$X$1>=$Z$1)*($C$1:$X$1<=$AA$1)*($C$2:$X$2=$B3)*($C3:$X3>=$AB$1))
 
Upvote 0
=SUMPRODUCT(($C$1:$X$1>=$Z$1)*($C$1:$X$1<=$AA$1)*($C$2:$X$2=$B3)*($C3:$X3>=$AB$1))

Hi RasGhul,

Thanks very much. The formula above that you gave me works! On our spreadsheet, the dates are formatted properly so there were no issues.

Further questions would be the following.

1) How will the formula change if we add another lookup period. For example, instead of June 5-17 only, we also want info for both June 5-17 and June 19-22?
2) The above formula gives us the count for parcel pick-ups for 4-5 parcels. How will the formula change if we want info for pickups done on preferred dates for both 1 parcel and 3 parcels (added together)?

Thanks again.

Help101



Hi Help,

Pls disregard post 2#

Hi,

You'll need to use the date formula to give you real June dates from 01-06-19, then you can format them as mmm-dd if you want Month / Day like your sample.

(Column G to Column S) Should mean 05-06-19 to 17-06-19 which is ok because you can change the Start & End date or the Parcel starting qty with the following;

ABCDEXYZAAAB
101-06-1902-06-19Jun-03Jun-2205-06-1917-06-194
2CustomerPreferred7127
3Customer 1352021
4Customer 2521231
5Customer 3211011
6Customer 4703200
7Customer 5221100
8Customer 6133150
9Customer 7311250
10Customer 8611430
11Customer 9222200
12Customer 10511050

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
D1=C1+1
Z3=SUMPRODUCT(($C$1:$X$1>=$Z$1)*($C$1:$X$1<=$AA$1)*($C$2:$X$2=$B3)*($C3:$X3>=$AB$1))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Ok the following, if I understand correctly;

Date range 5/06 - 17/06, on Preferred Day and Qty 1 & Qty 3 then
Date range 19/06 - 22/06, on Preferred Day and Qty 1 & Qty 3 added together.


Book1
ABCXYZAAABACADAE
11/06/201922/06/2019StartEndStartEndQty 1Qty 2
2CustomerPreferred775/06/201917/06/201919/06/201922/06/201913
3Customer 13520
4Customer 25231
5Customer 32110
6Customer 47001
7Customer 52201
8Customer 61351
9Customer 73151
10Customer 86131
11Customer 92202
12Customer 105153
Sheet1
Cell Formulas
RangeFormula
Z3=SUMPRODUCT(($C$1:$X$1>=$Z$2)*($C$1:$X$1<=$AA$2)*($C$2:$X$2=$B3)*($C3:$X3=$AD$2))+SUMPRODUCT(($C$1:$X$1>=$Z$2)*($C$1:$X$1<=$AA$2)*($C$2:$X$2=$B3)*($C3:$X3=$AE$2))+SUMPRODUCT(($C$1:$X$1>=$AB$2)*($C$1:$X$1<=$AC$2)*($C$2:$X$2=$B3)*($C3:$X3=$AD$2))+SUMPRODUCT(($C$1:$X$1>=$AB$2)*($C$1:$X$1<=$AC$2)*($C$2:$X$2=$B3)*($C3:$X3=$AE$2))
 
Upvote 0
Thanks RasGhul. I have not had the chance to use your new formula yet. I will test these on our data.

I would also like to share with you the formula below that I tried by myself but based on your example. This formula counts pick-up for both 1 and 3 parcels for June 5-17, 2019. So far, it works.

=SUMPRODUCT(($C$1:$X$1>=$Y$1)*($C$1:$X$1<=$Z$1)*($C$2:$X$2=$B3)*(($C3:$X3=$AA$1-3)+($C3:$X3=$AA$1-1))), where $AA$1=4 (from your older table). This formula is shorter.

Instead of

=SUMPRODUCT(($C$1:$X$1>=$Y$1)*($C$1:$X$1<=$Z$1)*($C$2:$X$2=$B3)*($C3:$X3=$AA$1-3) + =SUMPRODUCT(($C$1:$X$1>=$Y$1)*($C$1:$X$1<=$Z$1)*($C$2:$X$2=$B3)*($C3:$X3=$AA$1-1). This formula is longer.

Regards,

Help101
 
Upvote 0
Thanks very much RasGhul. Your formula worked! :eek:

Regards,

Help101

Ok the following, if I understand correctly;

Date range 5/06 - 17/06, on Preferred Day and Qty 1 & Qty 3 then
Date range 19/06 - 22/06, on Preferred Day and Qty 1 & Qty 3 added together.

ABCXYZAAABACADAE
11/06/201922/06/2019StartEndStartEndQty 1Qty 2
2CustomerPreferred775/06/201917/06/201919/06/201922/06/201913
3Customer 13520
4Customer 25231
5Customer 32110
6Customer 47001
7Customer 52201
8Customer 61351
9Customer 73151
10Customer 86131
11Customer 92202
12Customer 105153

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
Z3=SUMPRODUCT(($C$1:$X$1>=$Z$2)*($C$1:$X$1<=$AA$2)*($C$2:$X$2=$B3)*($C3:$X3=$AD$2))+SUMPRODUCT(($C$1:$X$1>=$Z$2)*($C$1:$X$1<=$AA$2)*($C$2:$X$2=$B3)*($C3:$X3=$AE$2))+SUMPRODUCT(($C$1:$X$1>=$AB$2)*($C$1:$X$1<=$AC$2)*($C$2:$X$2=$B3)*($C3:$X3=$AD$2))+SUMPRODUCT(($C$1:$X$1>=$AB$2)*($C$1:$X$1<=$AC$2)*($C$2:$X$2=$B3)*($C3:$X3=$AE$2))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,213,497
Messages
6,113,998
Members
448,541
Latest member
iparraguirre89

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