Hi There,
Hoping someone may have a suggestion for me (VBA, or formula, or other). I want to transpose certain cells based on a condition in a separate column (but same row). To illustrate with an example, I would like all values from column C to be transposed into the relevant row depending on Column B's value. E.g. Column B to contain one line of "Jonathon" and all items in Column C against Jonathon's name are transposed in Row 1. Then Same for other names in Column B. See example of initial data below (A-C columns), and then desired format (E-L columns).
I've seen the INDEX formula used to transpose a certain number of values, but in my case the number of values to be transposed will range from 3 to about 8, so I can set a certain amount in the formula.
Would appreciate any ideas. Thank you in advance!
A B C D E F G H I J K L
[TABLE="width: 788"]
<colgroup><col><col><col span="10"></colgroup><tbody>[TR]
[TD]ABC[/TD]
[TD]Jonathon[/TD]
[TD]Cat[/TD]
[TD] [/TD]
[TD]Jonathon[/TD]
[TD]Cat[/TD]
[TD]Dog[/TD]
[TD]Bird[/TD]
[TD]Fish[/TD]
[TD]Elephant[/TD]
[TD]Panda[/TD]
[TD]Bear[/TD]
[/TR]
[TR]
[TD]XYZ[/TD]
[TD]Jonathon[/TD]
[TD]Dog[/TD]
[TD] [/TD]
[TD]Peter[/TD]
[TD]Dog[/TD]
[TD]Bird[/TD]
[TD]Fish[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]DUA[/TD]
[TD]Jonathon[/TD]
[TD]Bird[/TD]
[TD] [/TD]
[TD]Jessica[/TD]
[TD]Elephant[/TD]
[TD]Panda[/TD]
[TD]Dog[/TD]
[TD]Bird[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]WQH[/TD]
[TD]Jonathon[/TD]
[TD]Fish[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]FDI[/TD]
[TD]Jonathon[/TD]
[TD]Elephant[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
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D]
[TD] [/TD]
[/TR]
[TR]
[TD]IRF[/TD]
[TD]Jessica[/TD]
[TD]Dog[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]IND[/TD]
[TD]Jessica[/TD]
[TD]Bird[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
Hoping someone may have a suggestion for me (VBA, or formula, or other). I want to transpose certain cells based on a condition in a separate column (but same row). To illustrate with an example, I would like all values from column C to be transposed into the relevant row depending on Column B's value. E.g. Column B to contain one line of "Jonathon" and all items in Column C against Jonathon's name are transposed in Row 1. Then Same for other names in Column B. See example of initial data below (A-C columns), and then desired format (E-L columns).
I've seen the INDEX formula used to transpose a certain number of values, but in my case the number of values to be transposed will range from 3 to about 8, so I can set a certain amount in the formula.
Would appreciate any ideas. Thank you in advance!
A B C D E F G H I J K L
[TABLE="width: 788"]
<colgroup><col><col><col span="10"></colgroup><tbody>[TR]
[TD]ABC[/TD]
[TD]Jonathon[/TD]
[TD]Cat[/TD]
[TD] [/TD]
[TD]Jonathon[/TD]
[TD]Cat[/TD]
[TD]Dog[/TD]
[TD]Bird[/TD]
[TD]Fish[/TD]
[TD]Elephant[/TD]
[TD]Panda[/TD]
[TD]Bear[/TD]
[/TR]
[TR]
[TD]XYZ[/TD]
[TD]Jonathon[/TD]
[TD]Dog[/TD]
[TD] [/TD]
[TD]Peter[/TD]
[TD]Dog[/TD]
[TD]Bird[/TD]
[TD]Fish[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]DUA[/TD]
[TD]Jonathon[/TD]
[TD]Bird[/TD]
[TD] [/TD]
[TD]Jessica[/TD]
[TD]Elephant[/T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