Group label to Row label

Rumble

New Member
Joined
May 20, 2011
Messages
2
Help!
My goal is to create a script or macro to take the "Group" type and add it as a column to the left -- see example below. In these examples I could then sort by Color to demonstrate the flexibility in the data. NOTE: there can be more "Groups", it is not just limited to 2 as shown in this example however the blank lines and format is consistent throughout.

Thoughts on the best approach to iterate/associate the Group name by row instead? The "." is used to assist with this posting to ensure my column/row examples line up...

Column A is blank here...
.....A......B......C......D...... E
1. ...... BLUE
2. .......Ball
3. .......Pale
4. .......Book
5. .................
6. .......Number Blue=3
7. ..................
8. .......RED
9. .......Sign
10. ......Cup
11. ......Door
12. ......Car
13. ......Poster
14. ....................
15. ..... Number Red=5

To now have my data have a 1-to-1 association and remove the grouping to perform pivots and other preferred ways to use the data, the final output would look like this essentially removing the grouping and label each row with the previous group value:

Column A would then become the Group Value
.....A......B......C......D.....E
1. BLUE....Ball
2. BLUE....Pale
3. BLUE....Book
4. RED.....Sign
5. RED.....Cup
6. RED.....Door
7. RED.....Car
8. RED.....Poster
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,224,597
Messages
6,179,808
Members
452,944
Latest member
2558216095

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