+ Reply to Thread
Results 1 to 6 of 6

Sort/Shuffle Certain columns for a given row

  1. #1
    Registered User
    Join Date
    03-02-2014
    Location
    CA, US
    MS-Off Ver
    Excel 2003
    Posts
    3

    Sort/Shuffle Certain columns for a given row

    I feel like this should be somewhat simple, but none of the normal methods I know seem to work. I want to set up a formula (not a basic sort, since I want it to automatically correct every time I change information) so that for each row, several columns re-sort by date.

    For instance, I have the following table:

    Item Type Dates

    A DV 5/2/14 6/12/14 7/11/15
    B DS 3/11/13 6/19/14 1/2/15
    C LG 11/12/14 8/1/15 1/12/16
    ...

    where each of the dates is in a new column, but the "Dates" title is merged between the cells

    I want to be able to resort just the date columns(/cells) for each row if a new date is written. I want the dates to be in ascending order. For instance, if I go back into the worksheet and replace Item A's date 5/2/14 with 1/1/16, I want the date columns JUST FOR Item A to reshuffle/resort to be:

    A DV 6/12/14 7/11/15 1/1/16


    without it resorting any other rows (Items) columns.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Sort/Shuffle Certain columns for a given row

    An automatic sort can't be performed by formula unless the results are to appear somewhere else. If can be done via VBA in the Sheet module:

    Please Login or Register  to view this content.
    Last edited by shg; 03-02-2014 at 05:15 PM.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,631

    Re: Sort/Shuffle Certain columns for a given row

    Please Login or Register  to view this content.
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    03-02-2014
    Location
    CA, US
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Sort/Shuffle Certain columns for a given row

    Thanks. That is probably a little more than I really want to do for this. Is there a way to calculate a statement using days of the week? In this case, some similar to a nearest integer function for days instead of numbers? I want a mark to appear if the date in a cell is less than two tuesdays from today. I usually check on Sundays, so at the moment, I have TODAY()+9, but I would prefer the sheet to work everyday.

    This is the current formula I have:

    =IF(OR((AND(D3<TODAY()+9,NOT(ISBLANK(D3)))),AND(E3<TODAY()+9,NOT(ISBLANK(E3))),AND(F3<TODAY()+9,NOT(ISBLANK(F3))),AND(G3<TODAY()+9,NOT(ISBLANK(G3)))),"*"," ")

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Sort/Shuffle Certain columns for a given row

    How does that relate to your original question about sorting?

  6. #6
    Registered User
    Join Date
    03-02-2014
    Location
    CA, US
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Sort/Shuffle Certain columns for a given row

    I was originally trying to make it easier to see when a rows date was coming up by reshuffling the dates in order. Two Tuesdays from whatever day it is is the important date. I figure it will be just as noticeable (if not more so) just to basically check the side of a row when the date is coming 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] 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
  2. Replies: 2
    Last Post: 01-15-2014, 09:31 AM
  3. Randomly shuffle columns
    By Savan87 in forum Excel General
    Replies: 9
    Last Post: 06-10-2011, 10:50 AM
  4. [SOLVED] Random sort/shuffle in Excel
    By WizGirl in forum Excel General
    Replies: 1
    Last Post: 06-27-2006, 10:25 PM
  5. [SOLVED] How do I do a random excel sort or shuffle, in no particular order
    By terrih in forum Excel General
    Replies: 2
    Last Post: 04-03-2006, 12:45 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