• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Find Column header to sort entire column

jasten

New Member
I would like to find a formula that searches for key words or exact words in a column header, then highlights that entire column so it can be cut and inserted in a new location?


Thanks,

Jasten
 
To expand on my post, let me paint the full picture. I receive a spreadsheet of information and have to perform a fairly quick analysis. I move six specifc columns to the front of the spreadsheet so they are in a specific order from A thru E (the rest of the columns do not need to be in any specific order). Once ordered in the correct format I copy and paste all those columns into another spreadsheet, which then populates several sheets of data, formulas and calculations. I do several of these per week.


I would like to create a macro to do this faster. I am very new to the macro realm of excel.


I receive data in a spreadsheet from multiple sellers and the column headers are usually labeled differently from each seller, sometimes they say "open date" or "acctopen" or "contract date," etc... In addition to that, the column refering to open/contract date can be column N from one seller and possibly column AA from another.


Ultimately I would to use a formula in conjunction with a macro that will find a column header from a key word of open or contract, then highlight, cut and insert the column in a specific location, such as Column A.


I need some help with another macro, so I will leave that for another post. I hope I am following correct etiquitte as I am new to this type of message board. I really appreciate the suggestions.
 
@Jasten... Here is what you can do.


Use conditional formatting to search and highlight keywords - example here.


http://chandoo.org/wp/2009/03/31/search-with-conditional-formatting/


Once the column is identified, start the macro recorder and move the column to beginning of spreadsheet. Stop the macro recorder. Observe the code generated from "view code" (you need to right click on sheet name and select "view code" and go to Module 1). This will show the macro code generated for moving selected column. Now, dabble a bit with the code and you should be able to figure out correct macro for moving the columns.


all the best
 
Back
Top