+ Reply to Thread
Results 1 to 13 of 13

Sorting formula results not working in 97

  1. #1
    Registered User
    Join Date
    02-08-2013
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 97
    Posts
    20

    Sorting formula results not working in 97

    I realize this should be a simple task, but I can't get it to work. In column 'K' I have lottery numbers from 1-40 in 40 rows and in column 'R' I have formulas with their results. I'd like to automatically sort the results in descending order into 2 new columns, one column for the sorted descending values, and the other column for the corresponding lottery numbers. All of this hopefully while keeping the original columns untouched. Is this possible in my very old version of Excel? Even trying to sort the formula column into itself, it won't sort. It just stays the same.
    Thanks!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Sorting formula results not working in 97

    assuming your data is in K (numbers 1-40) and L (your results), in M, copied down, use this...
    =LARGE($K$1:$K$40,ROW(A1)) change LARGE to SMALL if you want it the other way round.

    Then in n, use this, copied down...
    =VLOOKUP(M1,$K$1:$L$40,2,FALSE)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    02-08-2013
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 97
    Posts
    20

    Re: Sorting formula results not working in 97

    Thanks. I had a problem. I assume the two columns that I'm sorting have to be next to each other before the sort? Well, since the original columns I have are K and R, I decided to insert a copy of column K (numbers 1-40) at R and have the formula results at S. So starting with the adjacent columns R and S, and T and U being the target columns, I tried copying and pasting your first equation at T2, but for some reason it creates a long blank cell that usurps whatever was to the right of it. I have another column there with other formula results that it eliminated. I also tried copying and pasting your second equation at U2 and the same thing happens. I realize that the letters need to be changed, but I don't understand why it's taking over the other cells to the right. It seems to be merging all of the cells to the right.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Sorting formula results not working in 97

    hmmm curiouser and curiouser said Alice lol

    AZny chance you could upload a sample for me to work on?
    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.

  5. #5
    Registered User
    Join Date
    02-08-2013
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 97
    Posts
    20

    Re: Sorting formula results not working in 97

    Yes. Coming up thanks!

  6. #6
    Registered User
    Join Date
    02-08-2013
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 97
    Posts
    20

    Re: Sorting formula results not working in 97

    Here is a copy of the areas that I'm concerned about and the actual rows and columns. What's interesting is that sorting regular numbers works fine. It's the formula results that wouldn't work with a simple sort. Thanks!
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-08-2013
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 97
    Posts
    20

    Re: Sorting formula results not working in 97

    I see you're in PA. It's getting late and I understand not working on this tonight. I'm about to hit the hay. No emergency. Whenever you can get to it. Thanks again!

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Sorting formula results not working in 97

    I work 2nd trick, and im off today and tomorrow, so I still got a lil while

    In T, copied down...
    =LARGE($R$1:$R$40,ROW(A1))
    in U, copied down...
    =VLOOKUP(T1,$R$1:$S$40,2,FALSE)
    Last edited by FDibbins; 02-12-2013 at 03:00 AM.

  9. #9
    Registered User
    Join Date
    02-08-2013
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 97
    Posts
    20

    Re: Sorting formula results not working in 97

    Hmmm. I found out that it was the pasting of the formula that was causing the cell row domination, so I typed it all in manually and it didn't do that, so that problem is solved. But for some reason it isn't sorting again. I'm thinking there may be a glitch in my software and an incompatibility with the later versions you're using.

  10. #10
    Registered User
    Join Date
    02-08-2013
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 97
    Posts
    20

    Re: Sorting formula results not working in 97

    Just to let you know what I'm seeing... In T I have a descending list from 40-1 and the corresponding values of each of those numbers in U, but no sorting of the 40 numbers according to the descending values of U.

  11. #11
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Sorting formula results not working in 97

    because of the rand() function ????
    turn on calculation to manual ->recalculate using F9
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  12. #12
    Registered User
    Join Date
    02-08-2013
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 97
    Posts
    20

    Re: Sorting formula results not working in 97

    I switched the first equation to this and it sorted T properly. =LARGE($S$1:$S$40,ROW(A1))
    Now I need to alter the other equation to associate the correct 1-40 numbers to T's descending values.

  13. #13
    Registered User
    Join Date
    02-08-2013
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 97
    Posts
    20

    Re: Sorting formula results not working in 97

    I got it now. I learned from FDibbins formulas what to shoot for, and the attached file is what I ended up with.


    =LARGE($S$1:$S$40,ROW(A1))

    =VLOOKUP(U1,$S$1:$T$40,2,FALSE)
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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