+ Reply to Thread
Results 1 to 3 of 3

Rearrange(sort) Columns based on number in Column header string.

  1. #1
    Registered User
    Join Date
    03-27-2009
    Location
    Surat,India
    MS-Off Ver
    Excel 2007
    Posts
    52

    Rearrange(sort) Columns based on number in Column header string.

    Hi,

    I want to rearrange(sort asscending) columns based on numerical value in column header string through VBA macro.
    Please check attachment.

    i.e. (Present Data)
    # A B C D
    1 col.1 col.4 col.3 col.2

    (Output Data )
    # A B C D
    1 col.1 col.2 col.3 col.4

    Regards,

    Vishnu
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 2003, 2010, 2016 (Windows)
    Posts
    4,809

    Re: Rearrange(sort) Columns based on number in Column header string.

    Select a cell in your table and run this macro, or modify the code to select the range.

    Please Login or Register  to view this content.
    Last edited by Bernie Deitrick; 04-03-2014 at 10:05 AM.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    03-27-2009
    Location
    Surat,India
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Rearrange(sort) Columns based on number in Column header string.

    Sir! Bernie

    Thank you so much. It's work perfectly as i desired.
    PFA final sheet which i have made with this code.
    Your feedback on how i create vba is valuable to me.

    Thanks & Regards,
    Vishnu
    Attached Files Attached Files
    Last edited by hifliers; 04-04-2014 at 01:37 AM. Reason: Attachement missing

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to Sort Columns by Clicking on Column Header
    By hwhip in forum Excel General
    Replies: 2
    Last Post: 03-06-2014, 05:29 AM
  2. How to Sort Columns by Clicking on Column Header
    By hwhip in forum Excel General
    Replies: 4
    Last Post: 03-05-2014, 01:02 PM
  3. Find Column Header that includes String, then use that Address as Sort Key1
    By TimBZKK in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-07-2013, 05:17 PM
  4. [SOLVED] Sort multiple columns based on column header
    By Langer101 in forum Excel Programming / VBA / Macros
    Replies: 39
    Last Post: 01-09-2013, 09:55 AM
  5. Macro to rearrange/add columns based on column header?
    By drdavidge in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-07-2006, 09:35 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1