Results 1 to 5 of 5

Automatic Sorting Macro for Text Values

Threaded View

  1. #1
    Registered User
    Join Date
    04-26-2021
    Location
    Dallas, Texas
    MS-Off Ver
    Microsoft 365
    Posts
    3

    Question Automatic Sorting Macro for Text Values

    Hey all, newbie at Excel Macros here. I've looked around on the internet and can't seem to find a solution, so I'll post it here and hopefully get some answers.

    I am an inventory associate at a wholesale shirt store, and I want to use macros to automatically sort rows of shirt info so I can check if we have it in stock or not.
    Attached is a 20 row sample of shirts with some information.
    Column A shows the status of the shirt (N for new, P for preorder, C for check if it is available, D for discontinued, and I for in-stock which is the default normal value).
    Column B shows the date that either the Preorder shirts should arrive by, or the date that the New shirt was posted.
    Column C is the name of the shirt, referred to as Style #.
    Columns D through G are for seeing if the designs (called transfers) and/or the shirts with the designs are uploaded to the website. These can also be ignored for sorting.
    The data is in the range of A2:G20.

    What I would like to do with macros is the following:
    1. Automatically sort the rows so that items with status C are moved to the top (row 2), followed by status P, followed by status N, followed by statuses I and D, which don't need to be sorted.
    2. Automatically change P to C when the date in Column B passes today's date (in cell J3), which is 4/26/2021. I would set the formula to =TODAY() but I need the correct date for examples in the table.
    3. Automatically change N to I and remove the date from Column B when this date is 30 days past today's date. An example would be Row 19, which was New 30 days ago from today (4/26).
    4. Automatically alphabetically sort each section of rows using the names. The sections are based on the statuses: P, C, N, and D/I (which are mixed together). Within each section, sort the rows alphabetically using Column C.

    It is important that these things be automatic (or at least at the push of a button like F5 or something) because our stock has 2000+ items.
    Obviously any code I can copy and paste would be extremely helpful, but any sort of guidance or advice I can get would also be very appreciated!
    Attached Files Attached Files
    Last edited by BlueStylus; 04-26-2021 at 07:11 PM. Reason: Changed some unclear things

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Automatic partial formatting of text between certain values
    By schjacob in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-07-2019, 02:56 AM
  2. Sorting Ranges with Text Values and Number Values using Formula
    By oudavid1 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-27-2017, 03:05 PM
  3. Automatic sorting of values
    By PDAUGHE1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-02-2015, 08:01 PM
  4. [SOLVED] Is an automatic Sorting Macro possible?
    By ElmerFud in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-01-2014, 04:08 PM
  5. Automatic Sorting macro codes for Excel 2011
    By CMoore12 in forum Excel General
    Replies: 1
    Last Post: 07-18-2012, 03:46 AM
  6. Replies: 2
    Last Post: 06-17-2011, 03:00 PM
  7. Automatic Macro Sorting of cells
    By liampog in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-24-2010, 03:20 PM

Tags for this Thread

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