ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Calculating maximums from data sorted by SKU and date (https://www.excelbanter.com/excel-programming/373510-calculating-maximums-data-sorted-sku-date.html)

Mike

Calculating maximums from data sorted by SKU and date
 
I have data in a form similar to this:

Date;SKU;Production
Date1;SKU1;Production1
Date2;SKU2;Production2

The production field is just a number, the date is a date, and the SKU is a
string.

I need to find the max average production number for each unique SKU that
was produced in a given month. There are numerous SKUs and numerous dates
that they were produced over a range of months. Some example data below:

5/6/06;010102/1;5600
5/7/06;010102/1;4000
6/2/06;010102/1;3000
6/4/06;010102/1;4000
3/2/06;03531/1;400
3/6/06;03531/1;200
4/1/06;03531/1;500

So for this data I would need excel to spit out on a seperate sheet:

010102/1;4800
03531/1;500

4800 is the average production for the month of May for SKU 010102/1 and for
June for SKU 010102/1 the avg production was 3500, but the max production in
a month for that sku was 4800 so that was put on the sheet.

Any help would be greatly appreciated. Thanks.

Nigel

Calculating maximums from data sorted by SKU and date
 
Have you explored using a pivot table? This might offer the solution with
no programming required.

--
Cheers
Nigel



"Mike" wrote in message
...
I have data in a form similar to this:

Date;SKU;Production
Date1;SKU1;Production1
Date2;SKU2;Production2

The production field is just a number, the date is a date, and the SKU is
a
string.

I need to find the max average production number for each unique SKU that
was produced in a given month. There are numerous SKUs and numerous dates
that they were produced over a range of months. Some example data below:

5/6/06;010102/1;5600
5/7/06;010102/1;4000
6/2/06;010102/1;3000
6/4/06;010102/1;4000
3/2/06;03531/1;400
3/6/06;03531/1;200
4/1/06;03531/1;500

So for this data I would need excel to spit out on a seperate sheet:

010102/1;4800
03531/1;500

4800 is the average production for the month of May for SKU 010102/1 and
for
June for SKU 010102/1 the avg production was 3500, but the max production
in
a month for that sku was 4800 so that was put on the sheet.

Any help would be greatly appreciated. Thanks.




Mike

Calculating maximums from data sorted by SKU and date
 
I tried and it works great! Thanks! I guess I never really looked into Pivot
Tables before.

"Nigel" wrote:

Have you explored using a pivot table? This might offer the solution with
no programming required.

--
Cheers
Nigel



"Mike" wrote in message
...
I have data in a form similar to this:

Date;SKU;Production
Date1;SKU1;Production1
Date2;SKU2;Production2

The production field is just a number, the date is a date, and the SKU is
a
string.

I need to find the max average production number for each unique SKU that
was produced in a given month. There are numerous SKUs and numerous dates
that they were produced over a range of months. Some example data below:

5/6/06;010102/1;5600
5/7/06;010102/1;4000
6/2/06;010102/1;3000
6/4/06;010102/1;4000
3/2/06;03531/1;400
3/6/06;03531/1;200
4/1/06;03531/1;500

So for this data I would need excel to spit out on a seperate sheet:

010102/1;4800
03531/1;500

4800 is the average production for the month of May for SKU 010102/1 and
for
June for SKU 010102/1 the avg production was 3500, but the max production
in
a month for that sku was 4800 so that was put on the sheet.

Any help would be greatly appreciated. Thanks.






All times are GMT +1. The time now is 11:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com