Transpose Table of Data

  • In range G14 you have an example of the table I want.
    ' Note that the macro should work without any change in the VBA Code if there is more or less than 31 project and if there is
    ' more or less than 3 different benefits and complexity.
    '
    ' You have to write below the VBA code to do this.


    Results should appear like this.


    [TABLE="class: cms_table, width: 1168"]

    [tr]


    [TD="colspan: 4"]Example of result of the macro[/TD]

    [/tr]


    [tr]


    [td]

    Benefit/Compexity

    [/td]


    [td]

    Easy

    [/td]


    [td]

    Medium

    [/td]


    [td]

    Difficult

    [/td]


    [/tr]


    [tr]


    [td]

    High

    [/td]


    [td]

    Project_1 Project_15 Project_23

    [/td]


    [td]

    Project_2 Project_3 Project_11 Project_2 Project_3 Project_11

    [/td]


    [td]

    Project_5 Project_24 Project_29

    [/td]


    [/tr]


    [tr]


    [td]

    Medium

    [/td]


    [td]

    Project_4 Project_9 Project_14 Project_19 Project_28

    [/td]


    [td]

    Project_16 Project_17 Project_16 Project_17

    [/td]


    [td]

    Project_6 Project_12 Project_13 Project_18 Project_21 Project_22 Project_31

    [/td]


    [/tr]


    [tr]


    [td]

    Low

    [/td]


    [td]

    Project_7 Project_8 Project_10 Project_30

    [/td]


    [td]

    Project_20 Project_26 Project_27 Project_20 Project_26 Project_27

    [/td]


    [td]

    Project_25




    [/td]


    [/tr]


    [/TABLE]




    Data:


    [TABLE="class: cms_table, width: 296"]

    [tr]


    [td]

    Project Name

    [/td]


    [td]

    Benefit

    [/td]


    [td]

    Complexity

    [/td]


    [/tr]


    [tr]


    [td]

    Project_1

    [/td]


    [td]

    High

    [/td]


    [td]

    Easy

    [/td]


    [/tr]


    [tr]


    [td]

    Project_2

    [/td]


    [td]

    High

    [/td]


    [td]

    Medium

    [/td]


    [/tr]


    [tr]


    [td]

    Project_3

    [/td]


    [td]

    High

    [/td]


    [td]

    Medium

    [/td]


    [/tr]


    [tr]


    [td]

    Project_4

    [/td]


    [td]

    Medium

    [/td]


    [td]

    Easy

    [/td]


    [/tr]


    [tr]


    [td]

    Project_5

    [/td]


    [td]

    High

    [/td]


    [td]

    Difficult

    [/td]


    [/tr]


    [tr]


    [td]

    Project_6

    [/td]


    [td]

    Medium

    [/td]


    [td]

    Difficult

    [/td]


    [/tr]


    [tr]


    [td]

    Project_7

    [/td]


    [td]

    Low

    [/td]


    [td]

    Easy

    [/td]


    [/tr]


    [tr]


    [td]

    Project_8

    [/td]


    [td]

    Low

    [/td]


    [td]

    Easy

    [/td]


    [/tr]


    [tr]


    [td]

    Project_9

    [/td]


    [td]

    Medium

    [/td]


    [td]

    Easy

    [/td]


    [/tr]


    [tr]


    [td]

    Project_10

    [/td]


    [td]

    Low

    [/td]


    [td]

    Easy

    [/td]


    [/tr]


    [tr]


    [td]

    Project_11

    [/td]


    [td]

    High

    [/td]


    [td]

    Medium

    [/td]


    [/tr]


    [tr]


    [td]

    Project_12

    [/td]


    [td]

    Medium

    [/td]


    [td]

    Difficult

    [/td]


    [/tr]


    [tr]


    [td]

    Project_13

    [/td]


    [td]

    Medium

    [/td]


    [td]

    Difficult

    [/td]


    [/tr]


    [tr]


    [td]

    Project_14

    [/td]


    [td]

    Medium

    [/td]


    [td]

    Easy

    [/td]


    [/tr]


    [tr]


    [td]

    Project_15

    [/td]


    [td]

    High

    [/td]


    [td]

    Easy

    [/td]


    [/tr]


    [tr]


    [td]

    Project_16

    [/td]


    [td]

    Medium

    [/td]


    [td]

    Medium

    [/td]


    [/tr]


    [tr]


    [td]

    Project_17

    [/td]


    [td]

    Medium

    [/td]


    [td]

    Medium

    [/td]


    [/tr]


    [tr]


    [td]

    Project_18

    [/td]


    [td]

    Medium

    [/td]


    [td]

    Difficult

    [/td]


    [/tr]


    [tr]


    [td]

    Project_19

    [/td]


    [td]

    Medium

    [/td]


    [td]

    Easy

    [/td]


    [/tr]


    [tr]


    [td]

    Project_20

    [/td]


    [td]

    Low

    [/td]


    [td]

    Medium

    [/td]


    [/tr]


    [tr]


    [td]

    Project_21

    [/td]


    [td]

    Medium

    [/td]


    [td]

    Difficult

    [/td]


    [/tr]


    [tr]


    [td]

    Project_22

    [/td]


    [td]

    Medium

    [/td]


    [td]

    Difficult

    [/td]


    [/tr]


    [tr]


    [td]

    Project_23

    [/td]


    [td]

    High

    [/td]


    [td]

    Easy

    [/td]


    [/tr]


    [tr]


    [td]

    Project_24

    [/td]


    [td]

    High

    [/td]


    [td]

    Difficult

    [/td]


    [/tr]


    [tr]


    [td]

    Project_25

    [/td]


    [td]

    Low

    [/td]


    [td]

    Difficult

    [/td]


    [/tr]


    [tr]


    [td]

    Project_26

    [/td]


    [td]

    Low

    [/td]


    [td]

    Medium

    [/td]


    [/tr]


    [tr]


    [td]

    Project_27

    [/td]


    [td]

    Low

    [/td]


    [td]

    Medium

    [/td]


    [/tr]


    [tr]


    [td]

    Project_28

    [/td]


    [td]

    Medium

    [/td]


    [td]

    Easy

    [/td]


    [/tr]


    [tr]


    [td]

    Project_29

    [/td]


    [td]

    High

    [/td]


    [td]

    Difficult

    [/td]


    [/tr]


    [tr]


    [td]

    Project_30

    [/td]


    [td]

    Low

    [/td]


    [td]

    Easy

    [/td]


    [/tr]


    [tr]


    [td]

    Project_31

    [/td]


    [td]

    Medium

    [/td]


    [td]

    Difficult[Blocked Image: http://www.vbaexpress.com/forum/images/smilies/banghead.gif]

    [/td]


    [/tr]


    [/TABLE]

  • Re: VBA Code Required


    Quote

    you have an example of the table I want


    Quote

    macro should work ... without any change... if there is more or less


    Quote

    You have to write below...


    Quote

    Results should appear


    I'm trying to understand if these are instructions to you, or your instructions to anyone who might decide to reply.


    Regardless, other than the fact you just want someone to do your work for you, could you please explain the problem here?

  • Re: Transpose Table of Data


    I'm new to VBA.


    This is the task assigned to me.


    In excel, I can do it easier. Similarly, If data of Benefit and Complexity is fixed. then I am able to do it.


    But dynamically, If changes. Then don't know. how to do it.


    Pls help me

  • Re: Transpose Table of Data


    MODERATOR NOTICE: This topic has also been posted on other sites and may already have an answer elsewhere. Please take this into consideration when answering this question

    *

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!