Pivot or something else

ExcelKid_10

Board Regular
Joined
Mar 17, 2004
Messages
87
Hi all-

I'm trying to create a flexible summary of the following data:

What I'd like to be able to do is allow the user to select a market name(s) and be able to calculate a price per unit (by month and type code) for the combined markets. For example, if a user selected North Dakota and then Wisconsin the resulting summary would add up the report quantity and dollar amounts and then calculate a price per unit for the combined market by each month. I've tried a pivot however I have been unable to get a grouping by market name. Does anybody have any thoughts on a good way to go about this? Perhaps a VBA route is more appropriate. Thanks for any replies!
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Book1.xls
ABCDEFG
1MonthYearType CodeMarket NameReport QuantityReport Dollar AmtPrice Per Unit
212004NNorth Dakota2,500287,221$114.89
322004NNorth Dakota852287,221$337.11
432004NNorth Dakota733517,705$706.28
542004NNorth Dakota202582,899$2,885.64
652004NNorth Dakota350582,899$1,665.43
762004NNorth Dakota507703,154$1,386.89
872004NNorth Dakota150751,450$5,009.67
982004NNorth Dakota750774,206$1,032.27
1092004NNorth Dakota110812,036$7,382.14
11102004NNorth Dakota850812,036$955.34
12112004NNorth Dakota900812,036$902.26
13122004NNorth Dakota455812,036$1,784.69
1412004RNorth Dakota2,000687,952$343.98
1522004RNorth Dakota5501,033,829$1,879.69
1632004RNorth Dakota4501,035,160$2,300.35
1742004RNorth Dakota6531,093,599$1,674.73
1852004RNorth Dakota6981,391,859$1,994.07
1962004RNorth Dakota8791,391,859$1,583.46
2072004RNorth Dakota5461,391,859$2,549.19
2182004RNorth Dakota3591,417,347$3,948.04
2292004RNorth Dakota8721,471,723$1,687.76
23102004RNorth Dakota4891,536,988$3,143.12
24112004RNorth Dakota4441,572,872$3,542.50
25122004RNorth Dakota6981,608,278$2,304.12
Sheet3
 
Upvote 0

Forum statistics

Threads
1,223,431
Messages
6,172,079
Members
452,444
Latest member
ShaImran193

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