+ Reply to Thread
Results 1 to 4 of 4

Copy and Sort Cells w/ Multiple Occurences

  1. #1
    Registered User
    Join Date
    10-04-2013
    Location
    Lubbock, Texas
    MS-Off Ver
    Excel 2003
    Posts
    18

    Copy and Sort Cells w/ Multiple Occurences

    I have a employee schedule document I want to sort. B1:B40 is a list of all the names, C1:C40 is a list of all the times scheduled to arrive. I want to have the names and times copied into another range and sorted so that the 1st person scheduled shows up 1st and the 2nd next and so on. I’ve got the times sorted ok but using the VLOOKUP function on names works accept when two associates are scheduled at the same time in which case it keeps giving the 1st instance into all times. How can I solve this? I would also like to leave the cell blank if no data is found.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Copy and Sort Cells w/ Multiple Occurences

    Hi,

    Would you upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    10-04-2013
    Location
    Lubbock, Texas
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Copy and Sort Cells w/ Multiple Occurences

    Columsn J-L are my desired result except the employee who is repeating 3 times vs going to the nest scheduled employee and then the next. I would like them sorted by time arrived and then leave blank any cells that are not used.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Copy and Sort Cells w/ Multiple Occurences

    I updated columns J:L to reflect what I believe the OP's expected resuts are.

    This attempt needs a helper column-E. Paste the following into E1 and copy down (it's NOT an array formula) to E20.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Select cells A1:C12 and "Clear contents" - these apparently blank cells are not and are impacting the result. Do the same with A18:C20.

    Copy the following formula to F1 and enter as an array formula (CTRL-SHIFT-ENTER):

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Copy F1 across to G1:H1. Then copy F1:H1 down to F20:H20

    The expected results are now in columns F:H

    The attached spreadsheet has been updated per the above.
    Attached Files Attached Files
    Last edited by GeoffW283; 11-15-2018 at 02:38 PM. Reason: Add formula tags

+ 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: 3
    Last Post: 12-15-2017, 05:30 AM
  2. Faster Way to Sort and Copy to Multiple Sheets
    By Lephantome92 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-13-2017, 07:43 AM
  3. Replies: 2
    Last Post: 03-30-2016, 01:55 PM
  4. Count Occurences based on multiple cells
    By bimo in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-15-2014, 09:09 AM
  5. [SOLVED] Copy and sort cells
    By royalB in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-01-2014, 06:48 AM
  6. Copy data from multiple files into one and sort it
    By neowok in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-27-2013, 11:51 AM
  7. Replies: 1
    Last Post: 06-13-2012, 11:07 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