+ Reply to Thread
Results 1 to 5 of 5

VBA to Sort Value in a range of cell for multiple Column

  1. #1
    Registered User
    Join Date
    12-29-2012
    Location
    USA
    MS-Off Ver
    Office 2019
    Posts
    37

    VBA to Sort Value in a range of cell for multiple Column

    Hello and thank you in advance

    i have three section that contain sporadic values, I'm struggling to have a VBA code that can sort and organize these value from top to bottom and from small to large under its own columns
    and so there no blank cell in between values.
    i have attached the example
    kindly and very well appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,156

    Re: VBA to Sort Value in a range of cell for multiple Column

    1. Should the sorting be done within each section separately or is all data to be moved to the top-one section ?
    2. Do the sections have fixed sizes (at this moment: sec1 = 15 rows x 14 cols; sec2 = 19 rows x 14 cols; sec3 = 19 rows x 14 cols) ?

  3. #3
    Registered User
    Join Date
    12-29-2012
    Location
    USA
    MS-Off Ver
    Office 2019
    Posts
    37

    Re: VBA to Sort Value in a range of cell for multiple Column

    very good question , here is why !
    1-sorting to be done within each section
    2-these section has fixed sizes,
    now i was planning to alter the vba code to make it fit into 6 other departments located on the same "sheet1" similar to Book3 example, that each has fixes row count, but varies in different column count.
    thank you

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,625

    Re: VBA to Sort Value in a range of cell for multiple Column

    Does each column in each section to be sorted Ascending separately?
    Pl give the expected result of the given data in other sheet.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Registered User
    Join Date
    12-29-2012
    Location
    USA
    MS-Off Ver
    Office 2019
    Posts
    37

    Re: VBA to Sort Value in a range of cell for multiple Column

    I have attached the whole sheet to be more helpful, and this sheet contains marcos and VBA functions might not work for you accordingly cause I did copy paste.
    I do have a working macro to sort the header columns (small to large) than (left to right) in each section.
    and that keeps the current values under its own column but not sorted from small to large, and top to bottom.

    Thank you again for the follow up

+ 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. [SOLVED] Set range using header values and then multiple column sort using vba
    By Sum in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-11-2022, 08:33 AM
  2. [SOLVED] Copy column range in the same column multiple times based on cell value
    By PaulM100 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-15-2019, 06:22 AM
  3. Replies: 12
    Last Post: 09-08-2018, 10:34 PM
  4. Replies: 2
    Last Post: 01-29-2014, 09:50 AM
  5. [SOLVED] Sort by multiple columns with sort criteria cell dependent
    By BRISBANEBOB in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-24-2014, 02:22 AM
  6. Replies: 1
    Last Post: 12-20-2010, 06:30 PM
  7. Replies: 1
    Last Post: 06-17-2006, 09:10 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