+ Reply to Thread
Results 1 to 4 of 4

Help Ordering Cells By Time

  1. #1
    Registered User
    Join Date
    01-18-2023
    Location
    London
    MS-Off Ver
    2019
    Posts
    4

    Help Ordering Cells By Time

    Good morning everyone

    I work for an animal-related charity. We have a long, complicated roster developed in Excel that can be difficult to manage.

    Volunteer shifts are divided by days (7 columns) and extend to over 100 rows. I need to be able to order the rows by start times, which are given in 24-hour format. However, the cells each contain a big, undifferentiated block of data indicating the volunteer's individual number (eg SP123), their respective start time (eg 14:30) and their job location and type for that day (eg 8219).

    How do I create a formula that will 'see' the start time in each cell and allow me to order those start times within individual columns indicating days? I want to be able to instantly see the earliest Monday shift, followed in the next row by the second-earliest, then the third-earliest, and so on. The last row should show the latest shift of that particular day.

    Please find attached a sample of the roster.

    Many thanks, Kent
    Attached Files Attached Files

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

    Re: Help Ordering Cells By Time

    Your sheet1 was difficult to work with because you have used multiple blank spaces (12 - 14, mostly) to cause your data to wrap to multiple lines. In the solution file, I replaced them (about 1000) with NewLine characters (alt+enter) (about 170, or so). I don't have )365, so I used helper cells on a separate sheet to extract the times via formulas (XL2016):
    Please Login or Register  to view this content.
    On sheet1, there are two options:
    (1) extract time only, J2:P21
    Please Login or Register  to view this content.
    (2) including name, etc. (R2:X21)

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

  3. #3
    Registered User
    Join Date
    01-18-2023
    Location
    London
    MS-Off Ver
    2019
    Posts
    4

    Re: Help Ordering Cells By Time

    Thank you for taking the time to produce this solution. I appreciate the effort. The original document is stuffed with conditional formatting and is poorly organised. Unfortunately it can't be altered much without disrupting the current rostering system, as shifts are plugged in from this sheet into another system at our head office.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,647

    Re: Help Ordering Cells By Time

    Here is a three step process to take the current roster to one that is ordered by time, albeit not formatted like the original.
    1. Columns J:P isolate the time using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    2. Columns R:X return the row numbers in order by time using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    3. Columns Z:AF display the time ordered data using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Note that columns J:X could be hidden for aesthetic purposes.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Help With Re-Ordering/Re-Naming Cells
    By ncf5031 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-11-2019, 07:05 AM
  2. [SOLVED] Chronological Ordering Of Time Periods In Pivot Table
    By bkahl34 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 05-24-2017, 05:25 PM
  3. Adding multiple cells from different colums and then ordering them
    By balexander1978 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-06-2015, 02:29 AM
  4. [SOLVED] Ordering cells with formula
    By AdrinBig in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-20-2014, 10:05 AM
  5. VBA Ordering User form for Purchase Ordering.
    By caf20012 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-10-2014, 01:50 PM
  6. Comparing cells and ordering
    By McKenzie in forum Excel General
    Replies: 5
    Last Post: 07-07-2010, 05:23 AM
  7. Re-ordering cells changes the formula
    By flimper in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-11-2006, 12:50 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