+ Reply to Thread
Results 1 to 5 of 5

Sorting Problem

  1. #1
    Registered User
    Join Date
    05-03-2019
    Location
    San Francisco
    MS-Off Ver
    7
    Posts
    28

    Sorting Problem

    Hello,

    I have two different worksheets. One worksheet (Sheet 1) has columns A through D filled with different labels that are all correctly matched with each other. Column E is filled with a bunch of dates. The problem is the rows for columns A through D aren't sorted to match with the correct dates.

    The other worksheet (Sheet 2) has Sheet 1's column A and E matched correctly. What I need is for Sheet 1's rows to match Sheet 2's rows based on the indexing of Column A in Sheet 2. Help would be greatly appreciated. Thanks!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner VA USA
    MS-Off Ver
    MS 365 Family 64-bit 2505
    Posts
    27,426

    Re: Sorting Problem

    My first inclination is to replace your dates in column E with:

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


    and fill down.

    But when you say "What I need is for Sheet 1's rows to match Sheet 2's rows" do you mean:

    1. You need Sheet1 A:D to be sorted differently to match Sheet2

    or

    2. You need the dates in Sheet1 column E to be correctly matched to the data in A:D, based on what is in Sheet2

    ?

    If my answer is not what you need then please attach a sample file showing what result you want.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    05-03-2019
    Location
    San Francisco
    MS-Off Ver
    7
    Posts
    28

    Re: Sorting Problem

    Solved this!

    Use the match function.

  4. #4
    Registered User
    Join Date
    05-03-2019
    Location
    San Francisco
    MS-Off Ver
    7
    Posts
    28

    Re: Sorting Problem

    I needed 1. Figured it out! The key was the MATCH function.

    I selected a column next to the range which needed to be resorted (Sheet1 A:D) and entered

    =MATCH(B1, O:O, FALSE)

    B1: the indexing key

    O: the indexing key but in the correct order

    I autofilled this formula down the entire range to get the correct indexing, and then resorted based on the new index. My date column was not part of this range, because it was already in the correct order.


    Thanks for your help!

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner VA USA
    MS-Off Ver
    MS 365 Family 64-bit 2505
    Posts
    27,426

    Re: Sorting Problem

    Thanks for sharing your solution. Please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

+ 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. Sorting problem
    By Isaacliu in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 12-08-2016, 02:49 PM
  2. problem with vba sorting
    By gordongekko in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2009, 03:43 PM
  3. Sorting Problem..
    By Wolcott in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-06-2007, 10:30 AM
  4. Not Sorting Problem?
    By lawdoggy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 PM
  5. Not Sorting Problem?
    By lawdoggy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  6. [SOLVED] Not Sorting Problem?
    By lawdoggy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  7. Not Sorting Problem?
    By lawdoggy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-25-2005, 03:05 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