Results 1 to 5 of 5

Sort a range with numbers, numbers suffix with letter and numbers mixed with text

Threaded View

  1. #1
    Registered User
    Join Date
    10-14-2020
    Location
    USA
    MS-Off Ver
    2010
    Posts
    3

    Sort a range with numbers, numbers suffix with letter and numbers mixed with text

    Hi,

    I have a range with a column containing numbers, numbers suffix with letter and numbers mixed with text. I need a VBA macro that sorts the numbers at the top and numbers with suffixes and numbers with text at the bottom. The column by which they wish to sort is dynamic and the range starts at row 4 and the last used column and row are determined dynamically. Usually the number of columns are around 60, that could change though.

    And the user can sort by column containing numbers, numbers suffix with letter, numbers + text, column containing dates, column containing text, column containing alphanumeric data. Need two separate macros to sort ascending and sort descending.

    I referred to Jindon's code from these threads -> "sorting mixed text and numbers" thread, and "optimize vba code without copy and paste" thread. I'm new to this forum and it won't let me add links.

    But I need help with modifying to suit my needs.

    For example, I would like the sort to return by a column

    11112
    11112C
    12345
    12345A
    12345B
    13456
    13456B
    13456D

    currently it returns
    11112
    12345
    13456
    11112C
    12345A
    12345B
    13456B
    13456D

    Thanks in advance for your help!
    Last edited by lakki; 10-14-2020 at 06:47 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Data Validation with mixed numbers and a single letter
    By TOMS2825 in forum Excel General
    Replies: 5
    Last Post: 08-09-2020, 10:49 AM
  2. [SOLVED] Sort numbers and numbers stored as text separately?
    By Mirisage in forum Excel General
    Replies: 2
    Last Post: 02-05-2019, 11:28 AM
  3. Replies: 11
    Last Post: 04-10-2017, 06:23 AM
  4. Sort Mixed Data With Periods, Letters, Numbers, Backslashes and Hyphens
    By officemate in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-16-2015, 01:59 PM
  5. [SOLVED] Convert numbers stored as text to numbers for range of data that changes
    By excel2425 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-06-2014, 01:57 PM
  6. [SOLVED] How to merge a numbers from 3 cells, eliminate repetitive numbers, and sort such numbers?
    By david gonzalez in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-22-2012, 11:59 AM
  7. Sort mixed numbers/letters
    By V-ger in forum Excel General
    Replies: 1
    Last Post: 11-14-2005, 06:55 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