1

I have a data from Pivot table that looks like this (Column A is empty)

10001   100.00% 
1   33.33% 
2   33.33%
3   33.33%
10002   100.00%
1   1.45%
2   6.60%
3   3.26%

and I want to make it in this format so that I can work with data. (Column A has ZIPCODE, B and C have same data from the table above)

      10001 100.00%
10001   1   33.33%
10001   2   33.33%
10001   3   33.33%
    10002   100.00%
10002   1   1.45%
10002   2   6.60%

I wanted to write a code that reads through column B that the length meets 5 (ZIPCODE) then copypaste the ZIPCODE where the length isn't 5 then repeat till next ZIP.

Any wisdom would be appreciated.

Community
  • 1
  • 1
  • 1
    Use the `Repeat Item Labels` option in the `Layout & Printing` tab of the Field Settings to fill all the zip codes. Then use [Reverse Pivot](http://stackoverflow.com/questions/20541905/convert-matrix-to-3-column-table-reverse-pivot-unpivot-flatten-normal) to flatten the table. VBA eliminated :) – Scott Holtzman Feb 17 '16 at 16:03
  • It magically worked! Thank you so much :-) I wanted VBA so that I can learn to code a bit but this made what I wanted happen. I appreciate it! – MsRestlesstraeler Feb 18 '16 at 16:11

0 Answers0