Michael151
Board Regular
- Joined
- Sep 20, 2010
- Messages
- 247
<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";} </style> <![endif]--> Hello all,
Just need a little help writing a macro that will rearrange columns in a worksheet based on the header.
Currently, my worksheets have up to 10 different unique column headers that need to be in a specific order (after running the macro).
However, the worksheets may not always contain all 10 unique headers, sometimes only 6 or 8. If this is the case, the macro should simply place the columns in order (skipping over those columns missing).
For example:
DFACBE becomes: ABCDEF
DFABE becomes: ABDEF
If columns need to be placed in a specific column, maybe a separate function that will delete empty columns if needed.
Any help would be most appreciated – thanks!
Just need a little help writing a macro that will rearrange columns in a worksheet based on the header.
Currently, my worksheets have up to 10 different unique column headers that need to be in a specific order (after running the macro).
However, the worksheets may not always contain all 10 unique headers, sometimes only 6 or 8. If this is the case, the macro should simply place the columns in order (skipping over those columns missing).
For example:
DFACBE becomes: ABCDEF
DFABE becomes: ABDEF
If columns need to be placed in a specific column, maybe a separate function that will delete empty columns if needed.
Any help would be most appreciated – thanks!