1

I'm new to VBA and I'm trying to move data from a column to another column in a different format in the same worksheet. The original data looks like this:

Point   Load     FX      FY     FZ
1       DEAD    -0.29    9.24   182.06
1       LIVE     0.02    1.75    32.42
1       COMB2   -0.31   13.89   270.34
1       COMB22  -0.26   10.99   214.48
2       DEAD     0.2    -0.7    265.21
2       LIVE    -0.01   -1.58    57.74
2       COMB2    0.23   -3.37   410.64
2       COMB22   0.2    -2.28   322.95

I want to arrange this to another set of columns with a format similar to this:

    DL            LL           COMB2 1.2D+1.6L        COMB22 DL+LL  
Point    FX   FY  FZ   FX  FY  FZ     FX   FY  FZ       FX    FY     FZ
1      -0.29 ............................................................214.48
2       0.2                                                              322.95

I didn't insert all the number since there wasn't enough space.
But this is basically what I need it to look like

3
  • 1
    See if you can do this using pivot tables....will be a lot easier than VBA Nov 20, 2013 at 18:52
  • Please insert those numbers in your output. What have you tried so far? We are not a Plx do my work site. SU users will give full answers if you tried it your own and you're stuck somewhere.
    – nixda
    Nov 20, 2013 at 18:52
  • Adding to my previous comment. The pivot table will give you a dropdown so you can see results for only 1 criteria at a time. If you want them all, just copy the resulting table of each dropdown item and paste as values.. Nov 20, 2013 at 19:48

1 Answer 1

0

I'd do it in two steps:

  1. Reformat your data using my unpivot available here: http://tduhameau.wordpress.com/2012/09/24/the-unpivot-add-in/
  2. Run a pivot table on the reformatted data as suggested by tumchaaditya.

Not the answer you're looking for? Browse other questions tagged .