Counting Unique Values and also Sums in a specified date range.

Davereau

New Member
Joined
Feb 15, 2016
Messages
30
I utilize the below table to access various sales data. I have a separate file to calculate unique orders and totaling sales per month (each month has it's own tab). I copy this information from a master sales data file. What I would like to do is grab that information from the master file instead of copying each months worth data to a new file. For example I use this formula to see how many orders that are in that month. Some have multiple line items but it only counts that sales order number once.

=SUMPRODUCT((A3:A135<>"")/COUNTIF(A3:A135,A3:A135&""))

In the above example, the number of rows are fixed for the certain month i would be calculating.

So in the above formula example, I am trying to find out how many unique So_Nbr's there are but would like to use a date range with the dates in the Taken_Date column. There is more that I am trying to do, but I think if I can figure this out the rest should fall in line.

I have deleted information from the "Name" and "Desc" columns to protect the innocent.

I understand i may not have explained well so let me know if you have any questions.

Thanks in advance.

Dave


So_NbrCust_NbrNameCust_Po_NbrTaken_DateReqdDateShipped_DatePart_NbrTot_Qty Unit_Price Tot_Value
1021576020007911/09/201612/06/2016Not Shipped9009558 $ 115.26 $ 922.08
1021575110004811/09/201612/06/2016Not Shipped90564512 $ 33.38 $ 400.56
1021574070002011/09/201612/20/2016Not Shipped9072392 $ 63.54 $ 127.08
1021573200000911/09/201612/08/2016Not Shipped90461754 $ 45.44 $ 2,453.76
1021572090006011/09/201612/06/2016Not Shipped9008214 $ 175.56 $ 702.24
1021571030002111/09/201612/06/2016Not Shipped9009558 $ 115.26 $ 922.08
1021570140004611/08/201612/06/2016Not Shipped9009578 $ 157.03 $ 1,256.24
1021569220000111/08/201612/06/2016Not Shipped9014464 $ 57.19 $ 228.76
1021568190001111/08/201612/06/2016Not Shipped903389800 $ 1.41 $ 1,128.00
1021567040000711/08/201612/06/2016Not Shipped90714724 $ 50.00 $ 1,200.00
1021566040000711/08/201612/05/2016Not Shipped90499160 $ 33.08 $ 1,984.80
1021565040000711/07/201612/05/2016Not Shipped9071834 $ 161.30 $ 645.20
1021564020000211/07/201612/07/2016Not Shipped902905100 $ 34.39 $ 3,439.00
1021563130001811/07/201612/05/2016Not Shipped9038193 $ 333.08 $ 999.24
1021562130008711/07/201608/14/2017Not Shipped90692440 $ 42.00 $ 1,680.00
1021561130008711/07/201604/28/2017Not Shipped90692440 $ 42.00 $ 1,680.00
1021560130008711/07/201601/09/2017Not Shipped90692440 $ 42.00 $ 1,680.00
1021559040000711/07/201612/01/2016Not Shipped90714718 $ 50.00 $ 900.00
1021558040000711/07/201611/29/2016Not Shipped9071486 $ 33.00 $ 198.00
1021557040005511/07/201611/30/2016Not Shipped90694120 $ 126.49 $ 2,529.80
1021557040005511/07/201611/30/2016Not Shipped90313816 $ 217.64 $ 3,482.24
1021556220005111/07/201612/02/2016Not Shipped90368894 $ 85.00 $ 7,990.00
1021555200004111/07/201601/18/2017Not Shipped90111191 $ 65.41 $ 5,952.31
1021554200004111/07/201601/18/2017Not Shipped90111153 $ 65.41 $ 3,466.73
1021553200004111/07/201612/30/2016Not Shipped901106156 $ 26.88 $ 4,193.28
1021552090000111/07/201611/14/201611/08/201690068116 $ 4.61 $ 73.76
1021551220000111/07/201612/02/2016Not Shipped9008524 $ 62.35 $ 249.40
1021550160000311/07/201612/02/2016Not Shipped90360730 $ 25.00 $ 750.00
1021550160000311/07/201612/02/2016Not Shipped90518130 $ 50.00 $ 1,500.00
1021549160000311/07/201612/02/2016Not Shipped90538150 $ 31.59 $ 1,579.50
1021548080006511/04/201612/02/2016Not Shipped9007034 $ 77.55 $ 310.20
1021547010018411/04/201612/01/2016Not Shipped9006854 $ 62.79 $ 251.16
1021546090001111/04/201611/29/2016Not Shipped9006556 $ 72.60 $ 435.60
1021545200000911/04/201612/23/2016Not Shipped90362624 $ 116.00 $ 2,784.00
1021544030002111/04/201612/01/2016Not Shipped90144620 $ 54.98 $ 1,099.60
1021543060000411/02/201611/30/2016Not Shipped9014458 $ 43.91 $ 351.28
1021542010018311/02/201612/05/2016Not Shipped901100153 $ 91.39 $ 13,982.67
1021541020000211/02/201612/13/2016Not Shipped90290550 $ 34.39 $ 1,719.50
1021540130008711/02/201606/05/2017Not Shipped90692536 $ 45.00 $ 1,620.00
1021539130008711/02/201604/03/2017Not Shipped90692536 $ 45.00 $ 1,620.00
1021538040005311/01/201611/28/2016Not Shipped9024931 $ 66.30 $ 66.30
1021538040005311/01/201611/28/2016Not Shipped90068410 $ 10.80 $ 108.00
1021538040005311/01/201611/28/2016Not Shipped9009152 $ 97.77 $ 195.54
1021537090001110/31/201611/21/2016Not Shipped9006562 $ 70.18 $ 140.36
1021536130003110/31/201610/31/201610/31/20169006721 $ 117.36 $ 117.36
1021535040000710/31/201610/31/201611/03/201690714925 $ 45.00 $ 1,125.00
1021534060000310/29/201611/29/201611/04/20169021538 $ 126.00 $ 1,008.00
1021533090001110/29/201611/29/2016Not Shipped90443720 $ 3.95 $ 79.00
1021532200000910/29/201611/29/2016Not Shipped90362250 $ 18.50 $ 925.00
1021531090005910/29/201611/28/2016Not Shipped9029065 $ 76.09 $ 380.45
1021530130000410/29/201611/30/2016Not Shipped9008208 $ 126.65 $ 1,013.20
1021529060000410/28/201611/29/2016Not Shipped9010418 $ 41.33 $ 330.64
1021527200000910/27/201611/28/2016Not Shipped903538224 $ 34.66 $ 7,763.84
1021527200000910/27/201611/28/2016Not Shipped9039202 $ 32.17 $ 64.34
1021526140004610/26/201611/23/2016Not Shipped9009578 $ 157.03 $ 1,256.24
1021525090000210/26/201611/23/2016Not Shipped9028841 $ 403.22 $ 403.22
1021524040000710/26/201611/23/2016Not Shipped90718350 $ 123.29 $ 6,164.50
1021523040000710/26/201611/23/2016Not Shipped90718054 $ 123.29 $ 6,657.66
1021523040000710/26/201611/23/2016Not Shipped90499112 $ 42.28 $ 507.36
1021522010002010/26/201611/23/2016Not Shipped9020784 $ 118.51 $ 474.04
1021521010002010/26/201611/23/2016Not Shipped90599512 $ 45.39 $ 544.68
1021520090003110/26/201611/30/2016Not Shipped90792345 $ 140.57 $ 6,325.65
1021519110001010/26/201611/22/2016Not Shipped9042746 $ 83.74 $ 502.44
1021518220000110/26/201611/22/2016Not Shipped9057073 $ 158.08 $ 474.24
1021517060000410/26/201611/23/2016Not Shipped90091466 $ 67.62 $ 4,462.92
1021516050007910/26/201611/22/201611/01/201690694220 $ 135.93 $ 2,718.60
1021516050007910/26/201611/22/201611/01/201690132020 $ 59.83 $ 1,196.60
1021515130001810/25/201611/22/2016Not Shipped9038216 $ 125.70 $ 754.20
1021514010018310/25/201612/02/2016Not Shipped906900138 $ 73.99 $ 10,210.62
1021513190001110/25/201611/22/2016Not Shipped9009568 $ 165.91 $ 1,327.28
1021512020000210/19/201611/21/2016Not Shipped9029063 $ 53.09 $ 159.27
1021511070002010/24/201612/20/2016Not Shipped90723918 $ 63.54 $ 1,143.72
1021510040005010/24/201611/21/2016Not Shipped9071515 $ 54.76 $ 273.80
1021509070000310/24/201605/02/2017Not Shipped9003008 $ 121.94 $ 975.52
1021509070000310/24/201605/02/2017Not Shipped90032612 $ 60.13 $ 721.56
1021508180000710/24/201611/18/2016Not Shipped9048353 $ 156.06 $ 468.18
1021507040005010/23/201611/18/201611/04/201690715120 $ 54.76 $ 1,095.20
1021506010016010/23/201611/18/201611/08/20169014476 $ 57.04 $ 342.24
1021505220005310/23/201611/18/201611/08/20169069383 $ 88.35 $ 265.05
1021504030002110/23/201611/17/2016Not Shipped90144636 $ 54.98 $ 1,979.28
1021503070005810/23/201611/17/201611/02/20169009156 $ 80.65 $ 483.90
1021502030007610/21/201610/24/201610/21/2016900204316 $ - $ -
1021501070000810/20/201611/16/201611/08/20169042752 $ 155.19 $ 310.38
1021500200000910/20/201611/16/2016Not Shipped90366952 $ 35.63 $ 1,852.76
1021499210000210/19/201610/20/201610/19/20169072742 $ - $ -
1021498200000910/19/201611/17/2016Not Shipped903538224 $ 34.66 $ 7,763.84
1021497040000710/19/201611/16/201610/24/20169071486 $ 33.00 $ 198.00
1021496180003210/19/201601/13/2017Not Shipped90642340 $ 60.00 $ 2,400.00
1021495220005110/18/201611/25/2016Not Shipped90384663 $ 43.77 $ 2,757.51
1021494130014610/18/201611/15/201611/03/20169049796 $ 155.89 $ 935.34
1021493140004610/18/201611/15/201610/26/201690095716 $ 157.03 $ 2,512.48
1021492010000110/17/201610/28/201610/20/20168000001 $ - $ -
1021491010000110/17/201610/26/201610/21/201680009980 $ - $ -
1021491010000110/17/201610/26/201610/21/20168000001 $ - $ -
1021490010000110/17/201610/21/201610/20/20168000995 $ - $ -
1021489060000410/17/201611/14/201611/08/201690144732 $ 57.04 $ 1,825.28
1021488120000510/17/201611/14/2016Not Shipped9078555 $ 425.00 $ 2,125.00
1021487180010810/17/201611/14/2016Not Shipped9030011 $ 422.96 $ 422.96
1021486180003310/17/201611/14/201611/08/20169008524 $ 73.11 $ 292.44
1021485040000710/17/201611/14/201611/08/20169071796 $ 139.95 $ 839.70
1021485040000710/17/201611/14/201611/08/201690499112 $ 42.28 $ 507.36
1021485040000710/17/201611/14/201611/08/201690505230 $ 52.07 $ 1,562.10
1021484060000310/17/201611/14/201611/08/201690253612 $ 62.79 $ 753.48
1021483130001810/17/201611/14/201611/01/20169038216 $ 125.70 $ 754.20
1021482070000110/17/201611/10/201611/03/20169009148 $ 74.32 $ 594.56
1021481040000710/17/201611/10/201611/04/201690699812 $ 67.99 $ 815.88
1021480130003410/17/201611/16/2016Not Shipped9075058 $ 130.07 $ 1,040.56
1021479130008710/17/201612/21/2016Not Shipped90692536 $ 45.00 $ 1,620.00
1021478010018310/17/201611/22/2016Not Shipped90456035 $ 87.19 $ 3,051.65
1021477180003210/17/201612/23/2016Not Shipped90642390 $ 60.00 $ 5,400.00
1021476090001110/17/201611/09/201610/19/201690443715 $ 3.95 $ 59.25
1021475130022110/17/201610/20/201610/18/20169006721 $ 117.36 $ 117.36
1021474010007710/17/201611/10/201610/24/20169024932 $ 61.88 $ 123.76
1021473130022010/13/201611/17/201610/26/2016906378492 $ 106.28 $ 52,289.76
1021472130021910/12/201611/16/2016Not Shipped9026544 $ 144.54 $ 578.16
1021471040000710/12/201611/09/201611/04/201690699812 $ 67.99 $ 815.88
1021470030004010/12/201611/09/201611/02/20169068603 $ 159.50 $ 478.50
1021469010007710/12/201611/08/2016Not Shipped9054172 $ 50.00 $ 100.00
1021468040000710/12/201611/10/201611/04/201690708012 $ 73.92 $ 887.04
1021467040003710/12/201611/09/201610/26/201690729810 $ 55.00 $ 550.00
1021466030006010/11/201611/07/201611/03/20169028973 $ 232.40 $ 697.20
1021465040000710/11/201611/07/201610/27/201690714718 $ 50.00 $ 900.00
1021464220005310/11/201611/14/201611/08/20169069436 $ 187.02 $ 1,122.12
1021463200000910/11/201611/08/2016Not Shipped903537112 $ 39.52 $ 4,426.24
1021462040005010/11/201611/07/201610/24/20169071525 $ 60.92 $ 304.60
1021461030001410/11/201611/04/201611/02/201690131910 $ 36.87 $ 368.70
1021460120002910/11/201611/07/201611/01/20169004024 $ 289.73 $ 1,158.92
1021459060000410/11/201611/04/201611/01/20169078336 $ 173.05 $ 1,038.30
1021458020000210/11/201611/09/201610/26/20169029062 $ 53.09 $ 106.18
1021457020000210/11/201611/18/2016Not Shipped90290550 $ 34.87 $ 1,743.50
1021456040003710/07/201611/04/201610/26/201690276010 $ 60.00 $ 600.00
1021455040000710/07/201611/03/201611/01/20169069986 $ 67.99 $ 407.94
1021455040000710/07/201611/03/201611/01/201690601942 $ 54.24 $ 2,278.08
1021455040000710/07/201611/03/201611/01/20169071796 $ 139.95 $ 839.70
1021455040000710/07/201611/03/201611/01/20169069976 $ 64.00 $ 384.00
1021454010018310/07/201601/20/2017Not Shipped906900680 $ 79.55 $ 54,094.00
1021453010002010/07/201611/02/201610/18/201690731046 $ 84.36 $ 3,880.56
1021452200000910/07/201611/01/201610/28/201690461754 $ 45.44 $ 2,453.76
1021451010007710/07/201611/01/201610/27/20169011416 $ 71.01 $ 426.06
1021450100003210/07/201610/14/201610/11/20169006721 $ 117.36 $ 117.36
1021449200000910/07/201611/03/201611/01/201690524713 $ 157.94 $ 2,053.22
1021448180011610/07/201610/18/201610/10/20169009561 $ 230.62 $ 230.62
1021448180011610/07/201610/18/201610/10/20169006842 $ 13.74 $ 27.48
1021447190001110/04/201610/31/201610/24/20169009148 $ 79.82 $ 638.56
1021446200000910/04/201611/01/201610/21/2016903538224 $ 34.66 $ 7,763.84
1021445040000710/04/201610/31/201610/18/20169071796 $ 139.95 $ 839.70
1021445040000710/04/201610/31/201610/18/201690505224 $ 52.07 $ 1,249.68
1021444040000710/04/201611/01/201610/27/201690714825 $ 45.00 $ 1,125.00
1021444040000710/04/201611/01/201610/27/201690714724 $ 50.00 $ 1,200.00
1021443010000110/03/201610/21/201610/11/20168027651 $ - $ -
1021442010000110/03/201610/21/201610/11/20168027654 $ - $ -
1021441130001810/03/201611/28/2016Not Shipped90382011 $ 103.17 $ 1,134.87
1021440040000710/03/201610/26/201610/18/20169070806 $ 73.92 $ 443.52
1021439090001110/03/201610/28/201610/19/20169006556 $ 72.60 $ 435.60
1021438200000910/03/201610/25/201610/24/2016903537112 $ 39.52 $ 4,426.24
1021437130021810/03/201610/28/201610/11/20169021802 $ 50.88 $ 101.76
1021436010012110/03/201610/28/201610/24/20169024934 $ 58.33 $ 233.32
1021435180000710/03/201610/28/201610/24/201690458312 $ 63.00 $ 756.00
1021434130004410/03/201610/27/201610/11/20169001992 $ 227.36 $ 454.72
1021433130004410/03/201610/27/201610/18/20169011492 $ 249.31 $ 498.62
1021432130004109/29/201610/27/201610/11/20169033746 $ 136.51 $ 819.06
1021431040005009/29/201610/24/201610/04/20169071515 $ 54.76 $ 273.80
1021430040000709/29/201610/25/201610/21/201690717910 $ 139.95 $ 1,399.50
1021429040000709/29/201610/25/201610/21/201690718030 $ 146.30 $ 4,389.00
1021428040000709/29/201610/24/201610/18/20169060196 $ 57.07 $ 342.42
1021428040000709/29/201610/24/201610/18/20169071806 $ 146.30 $ 877.80
1021428040000709/29/201610/24/201610/18/20169069986 $ 67.99 $ 407.94
1021428040000709/29/201610/24/201610/18/201690499112 $ 42.28 $ 507.36
1021427060003009/29/201610/24/201610/11/20169005041 $ 237.17 $ 237.17
1021426200000909/29/201610/26/201610/24/201690362250 $ 18.50 $ 925.00
1021425030004009/28/201610/25/201610/10/20169068602 $ 159.50 $ 319.00
1021424020003109/28/201610/27/201610/17/201690144726 $ 59.33 $ 1,542.58
1021423060000409/28/201610/25/201610/18/201690091358 $ 53.82 $ 3,121.56
1021422180003209/28/201612/12/2016Not Shipped90642365 $ 60.00 $ 3,900.00
1021421200000909/26/201611/01/201610/28/201690362624 $ 116.00 $ 2,784.00
1021420200004109/26/201601/24/2017Not Shipped901027474 $ 38.00 $ 18,012.00
1021419180000709/26/201611/11/201610/13/20169041116 $ 73.70 $ 442.20
1021418160000509/26/201610/20/201610/10/20169036403 $ 67.70 $ 203.10
1021417130011709/26/201603/31/2017Not Shipped907380150 $ 17.08 $ 2,562.00
1021416130011709/26/201603/31/2017Not Shipped907380150 $ 17.08 $ 2,562.00
1021415130011709/26/201603/31/2017Not Shipped907380150 $ 17.08 $ 2,562.00
1021414130011709/26/201603/31/2017Not Shipped907380150 $ 17.08 $ 2,562.00
1021413130011709/26/201603/31/2017Not Shipped907380150 $ 17.08 $ 2,562.00
1021412130011709/26/201603/31/2017Not Shipped907380150 $ 17.08 $ 2,562.00
1021411130011709/26/201610/28/201610/27/2016907380150 $ 17.08 $ 2,562.00
1021410010002009/23/201610/21/201610/18/201690675124 $ 113.44 $ 2,722.56
1021410010002009/23/201610/21/201610/18/20169052794 $ 79.27 $ 317.08
1021409220004509/23/201610/21/201610/18/20169079392 $ 152.56 $ 305.12
1021408040000709/22/201610/20/201610/18/20169070806 $ 73.92 $ 443.52
1021408040000709/22/201610/20/201610/18/201690718012 $ 146.30 $ 1,755.60
1021408040000709/22/201610/20/201610/18/20169071796 $ 139.95 $ 839.70
1021408040000709/22/201610/20/201610/18/201690499130 $ 42.28 $ 1,268.40
1021408040000709/22/201610/20/201610/18/201690505218 $ 52.07 $ 937.26
1021407060000409/22/201610/21/201610/17/201690144726 $ 57.04 $ 1,483.04
1021406030007609/22/201610/20/201609/27/2016903388636 $ 1.37 $ 871.32
1021405070000309/21/201602/03/2017Not Shipped90030615 $ 92.17 $ 1,382.55
1021404200003609/21/201610/19/201610/10/20169009448 $ 97.44 $ 779.52
1021403180000709/21/201610/17/201610/05/20169044432 $ 191.06 $ 382.12
1021402180000709/21/201610/21/201610/13/20169044434 $ 191.06 $ 764.24
1021401180000709/21/201610/17/201610/05/201690411224 $ 71.25 $ 1,710.00
1021400030004009/21/201610/19/201610/10/20169067692 $ 317.87 $ 635.74
1021399040000709/21/201610/19/201610/10/201690499112 $ 42.28 $ 507.36
1021398060003009/21/201610/19/201610/03/20169010412 $ 51.63 $ 103.26
1021397170004509/19/201610/14/201610/10/20169064973 $ 53.36 $ 160.08
1021396050003609/19/201610/14/201610/03/201690366424 $ 110.90 $ 2,661.60
1021395070007009/19/201610/06/201610/03/20169009142 $ 82.73 $ 165.46
1021394040000709/19/201610/13/201610/10/20169071796 $ 139.95 $ 839.70
1021394040000709/19/201610/13/201610/10/20169060196 $ 57.07 $ 342.42
1021394040000709/19/201610/13/201610/10/20169069986 $ 67.99 $ 407.94
1021394040000709/19/201610/13/201610/10/201690499112 $ 42.28 $ 507.36
1021393030002109/16/201610/12/201610/04/201690144624 $ 54.98 $ 1,319.52
1021392090001109/16/201610/13/201610/03/20169006561 $ 70.18 $ 70.18
1021391180001509/16/201610/13/201610/04/201690085220 $ 61.29 $ 1,225.80
1021390200000909/16/201610/14/201609/27/20169039204 $ 32.17 $ 128.68
1021389140004609/16/201610/15/201610/04/201690095416 $ 118.87 $ 1,901.92
1021388070000309/16/201611/10/2016Not Shipped90030020 $ 87.99 $ 1,759.80
1021387060000409/14/201610/04/201609/22/20169014472 $ 57.04 $ 114.08
1021386010002009/14/201610/12/201609/22/20169064458 $ 77.38 $ 619.04
1021385180000709/14/201610/21/201610/13/201690411024 $ 83.06 $ 1,993.44
1021384220000109/14/201610/12/201610/04/20169014464 $ 57.19 $ 228.76
1021383040000709/14/201610/12/201610/03/20169071486 $ 33.00 $ 198.00
1021382180010809/14/201610/12/201609/27/20169030011 $ 422.96 $ 422.96

<tbody>
</tbody>

<tbody>
</tbody>
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
To count the unique orders try one of these array formulas.
The formulas must be entered with CTRL-SHIFT-ENTER (command-return on MAC).
Based on the data you posted.
If the So_Nbr are actual numbers (numeric field) then try:

Code:
=SUM(IF(FREQUENCY(IF($E$2:$E$223>=$M$2,IF($E$2:$E$223<=$N$2,$A$2:$A$223)),$A$2:$A$223),1))

If they are text then try:

Code:
=SUM(IF(FREQUENCY(IF($E$2:$E$223>=$M$2,IF($E$2:$E$223<=$N$2,MATCH($A$2:$A$223,$A$2:$A$223,0))),ROW($A$2:$A$223)-ROW($A$2)+1),1))


Row\Col

A

B

C

D

E

F

L

M

N

1

So_Nbr

Cust_Nbr

Name

Cust_Po_Nbr

Taken_Date

ReqdDate

Start Date

End Date

2

1021576

200079

42683

42710

42658

42689

3

1021574

1100048

42683

42710

4

1021575

700020

42683

42724

Unique

5

1021573

2000009

42683

42712

Count

6

1021572

900060

42683

42710

102

7

1021571

300021

42683

42710

8

1021570

1400046

42682

42710

9

1021569

2200001

42682

42710

10

1021568

1900011

42682

42710

<tbody>
</tbody>
 
Upvote 0
I got it to work with your formulas AhoyNC! Thank you very much. I have been learning so much from these forums.

Below is the table I use those formulas in. The only thing I would like to do now is to exclude a certain type of product from my totals. In my master table, Column J lists the product family code for the corresponding product. The product I would like to exclude from these totals is the family of "SAMP" and would be listed in that column. What would be required in the existing formulas in order to exclude the SAMP product family?

# of Orders formula, =SUM(IF(FREQUENCY(IF(Data!$E:$E>=D3,IF(Data!$E:$E<=D4,Data!$A:$A)),Data!$A:$A),1))
# of Customers formula, =SUM(IF(FREQUENCY(IF(Data!$E:$E>=D3,IF(Data!$E:$E<=D4,Data!$B:$B)),Data!$B:$B),1))
# of Diff Parts formula, =SUM(IF(FREQUENCY(IF(Data!$E:$E>=D3,IF(Data!$E:$E<=D4,Data!$I:$I)),Data!$I:$I),1))

These were taken from the January column with D3 being 01/01/2016 and D4 being 01/31/2016. Just trying to figure out how to exclude the row from the totals that would have "SAMP" in column J.

2016 Entered Orders
JanuaryFebruaryMarchAprilMayJune
YTD01/01/201602/01/201603/01/201604/01/201605/01/201606/01/2016
01/31/201602/29/201603/31/201604/30/201605/31/201606/30/2016
779# of Orders8387102929582
192# of Customers444543464646
377# of Diff Parts777285829181
33,386# of Total Parts152434762877213635672463
1,739,527.88Total $ Value 90,767.78 223,590.35 210,218.06 88,910.81 177,494.03139,497.63
52%Avg Margin52%53%56%52%46%44%
JulyAugustSeptemberOctoberNovemberDecember
07/01/201608/01/201609/01/201610/01/201611/01/201612/01/2016
Average07/31/201608/31/201609/30/201610/31/201611/30/201612/31/2016
92# of Orders6695107104430
45# of Customers35514454250
80# of Diff Parts67947687370
3139# of Total Parts191926596372415222410
158,138.90Total $ Value 111,585.19 148,945.42 201,748.82 262,130.32 84,639.470
50%Avg Margin46%49%54%49%52%#DIV/0!

<tbody>
</tbody>
 
Upvote 0
Try the following. This are all array formulas and must be entered with CTRL-SHIFT-ENTER.
When using array formulas it is best to not reference whole columns as this can slow calculations down. Assuming row 1 had headers and your data won't go below say row 5000 then you could reference a range like A2:A7000 or turn your data range into a table that will expand as you add new data.

# of Orders formula
Code:
=SUM(IF(FREQUENCY(IF(Data!$E:$E>=D3,IF(Data!$E:$E<=D4,IF($J:$J<>"SAMP",Data!$A:$A))),Data!$A:$A),1))

# of Customers formula
Code:
=SUM(IF(FREQUENCY(IF(Data!$E:$E>=D3,IF(Data!$E:$E<=D4,IF($J:$J<>"SAMP",Data!$B:$B))),Data!$B:$B),1))

# of Diff Parts formula
Code:
=SUM(IF(FREQUENCY(IF(Data!$E:$E>=D3,IF(Data!$E:$E<=D4,IF($J:$J<>"SAMP",Data!$I:$I))),Data!$I:$I),1))
 
Upvote 0
I tried something similar but didn't work, but I think you have better placement of the quotation marks :). Will let you know how it works.

As far as the whole column referencing, i haven't had any problems but might make that change anyways.
 
Upvote 0
When using an array formula it is going to run on all cells that you reference even if they are empty. So in later ver. of Excel the formula is going to look at all one million plus rows. Since you have 3 array formulas it going to do this 3 times which can start to slow things down. So, if you do start to have problems in the future just keep that in mind.
 
Upvote 0
I got everything to work fine. The only thing I have to do that I didn't anticipate is to go to each of the columns on the data tab that I reference in my formulas and perform a "text to columns" to revert the cells to a general format. It is the only way I have found to have the results returned. The file is has to be updated each day as it is tied to our MRP database through a query. Each time I update, I need to revert to general format. It isn't that big of a deal as I don't use this file everyday.

Thanks again for all your help. It is nice to be able have all the data I require in one file than having to open multiple files all the time.

Dave
 
Upvote 0
You're welcome. Thanks for the feedback.
If you have an IT dept. you may want to check if there is a way to bring the data over in a different format that would save you from the "text to column". I use to have to deal with both MRP and ERP systems that would bring dates in as text.
 
Upvote 0
We don't have IT onsite, we contract a firm. If there were any onsite, I guess that would be me and well, that isn't saying much :LOL:. The information is stored in a Access Database and the only format I know of is to use excel.
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,040
Members
449,063
Latest member
ak94

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