We help IT Professionals succeed at work.

Move Columns Based on Header Value

G Scott
G Scott asked
on
Medium Priority
238 Views
Last Modified: 2012-05-11
I have an Excel sheet in which I need to rearrange columns based on a cell value within that column using a Macro. What I mean is, I need the columns in a specific order (thanks to Access). It seems that the Excel report keeps changing based on user preference. The only constant is the text in Row 1. It always have the same values from report to report. I have attached two spreadsheets, one is the template, the other is a different order. I just want to get #2 to look like #1. Of course, the row length will vary from report to report. Is this even possible? I was thinking some HLookups and VLookups in combination, but couldn't figure it out.

Thanks for any help you can give me.

 Sample1---Template.xls  Sample2-Out-Of-Order.xls
Comment
Watch Question

Engineer
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Worked perfectly! Thanks ssagibh.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.