+ Reply to Thread
Results 1 to 3 of 3

Macro to format and sort data with a pattern

  1. #1
    Registered User
    Join Date
    03-21-2014
    Location
    USA
    MS-Off Ver
    Office 2016
    Posts
    69

    Macro to format and sort data with a pattern

    Hi,

    I have some data that I want to get formatted/sorted in a certain way. I've included a before and after XLSX to show what I want the macro to accomplish.

    Here's the structure:

    Please Login or Register  to view this content.
    Every sample follows the format:
    HTML Code: 
    ------

    Things I want the macro to do:

    1)

    Format the structure so that it skip 2 lines before every category, 1 line after every category and 1 line for sub-categories.
    There are sometimes random 1 line skips in the sub-categories, which will need to be taken out.

    2)

    Anything that has the pattern:
    HTML Code: 
    Change to:
    HTML Code: 
    Anything that has the pattern:
    HTML Code: 
    Change to:
    HTML Code: 
    3)

    Sort by:
    1st) Sub-category (Apples, Oranges, Dragonfruit, etc)

    2nd) Quality (peerless,legendary,magnificent,exquisite,superior,average,fine,crude)

    Peerless is formatted:
    HTML Code: 
    Legendary is formatted:
    HTML Code: 
    The other quality tiers (magnificent,exquisite,superior,average,fine,crude) are as-is.

    3rd) Prefix (anything that is color coded/italicized goes first, in alphabetical order)

    i.e
    HTML Code: 
    4th) Level

    4)

    Insert this at the very top, line 1:
    HTML Code: 
    Then get the top five most expensive items and put it underneath. Prices are mostly abbreviated, m for millions and k for thousands, but there are some with the full, non-abbreviated amount. If there's a tie(s), sort it in the order of: Quality, Prefix, Level.
    Attached Files Attached Files
    Last edited by prvimoon; 06-16-2019 at 01:51 AM.

  2. #2
    Registered User
    Join Date
    03-21-2014
    Location
    USA
    MS-Off Ver
    Office 2016
    Posts
    69

    Re: Macro to format and sort data with a pattern

    Bumping, thank you.

  3. #3
    Registered User
    Join Date
    03-21-2014
    Location
    USA
    MS-Off Ver
    Office 2016
    Posts
    69

    Re: Macro to format and sort data with a pattern

    Bumping, thank you.

+ 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. Replies: 2
    Last Post: 05-26-2019, 10:29 AM
  2. How to sort after a repeating pattern
    By ajunos in forum Excel General
    Replies: 5
    Last Post: 05-05-2019, 03:09 AM
  3. [SOLVED] Macro that pastes data, how can I sort after pasting + format it to match older sheet data
    By stein7 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-27-2019, 07:20 PM
  4. Replies: 1
    Last Post: 03-04-2015, 02:57 PM
  5. Macro to insert pattern based on value and select based on pattern
    By CB569 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-15-2015, 12:36 PM
  6. Excel Macro to import Survey data as well as sort & format
    By nirmalreigns in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-28-2014, 12:52 PM
  7. Macro to Transpose Data in Pattern
    By Jakila2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2011, 05:41 AM

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