Macro Help - Transpose Quantity and QTR (Large amount of data)

tommiexboi

New Member
Joined
Apr 24, 2017
Messages
24
Office Version
  1. 365
Platform
  1. Windows
Hello,

Basically, I have over 1200 part numbers and I'm looking at an 8 quarter forecast.
I am trying to get the below result that will be quick and efficient. Would like to be able to sort by quarter and etc.

Any help will be greatly appreciated.


Current:
[TABLE="class: grid, width: 598"]
<tbody>[TR]
[TD]Part Number[/TD]
[TD]QTR 1[/TD]
[TD]QTR 2[/TD]
[TD]QTR 3[/TD]
[TD]QTR 4[/TD]
[TD]QTR 1[/TD]
[TD]QTR 2[/TD]
[TD]QTR 3[/TD]
[TD]QTR 4[/TD]
[/TR]
[TR]
[TD]ABC123[/TD]
[TD]67[/TD]
[TD]8[/TD]
[TD]8[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD]0[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]ABC124[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]10[/TD]
[TD]4[/TD]
[TD]2[/TD]
[TD]6[/TD]
[TD]0[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]ABC125[/TD]
[TD]3[/TD]
[TD]5[/TD]
[TD]12[/TD]
[TD]5[/TD]
[TD]3[/TD]
[TD]9[/TD]
[TD]3[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]

Result Needed:
[TABLE="class: grid, width: 360"]
<tbody>[TR]
[TD]Part Number[/TD]
[TD]Quarter[/TD]
[TD]Quantity[/TD]
[/TR]
[TR]
[TD]ABC123[/TD]
[TD]QTR 1[/TD]
[TD]67[/TD]
[/TR]
[TR]
[TD]ABC123[/TD]
[TD]QTR 2[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]ABC123[/TD]
[TD]QTR 3[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]ABC123[/TD]
[TD]QTR 4[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]ABC123[/TD]
[TD]QTR 1[/TD]
[TD]1[/TD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,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
A very good primer is "M is for (Data) Monkey by Ken Puls and Miguel Escobar. Available on Amazon.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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