+ Reply to Thread
Results 1 to 9 of 9

Automatically sort column numerically?

  1. #1
    Registered User
    Join Date
    07-22-2008
    Location
    UK
    Posts
    13

    Automatically sort column numerically?

    Hello helpful people

    I have a sheet which performs a bunch of calculations on a list of input numbers.

    The results of the calculations are rendered to a column (Say A1:A2500)
    The formulae for these calculations are in the cells A1:A2500 (different formula for each cell)

    I need to automatically keep the results column sorted in ascending numerical order, to perform a VLOOKUP on them.

    I have all the rest of it working fine but I can't find how to perform this (probably!) simple task anywhere.
    A manual sort of the column results in no change to the order at all, I am guessing because of the formulae in the cells overriding the sort function??

    As for doing it automatically - I'm lost - because my area of expertise is in what I want the spreadsheet for and not in writing Excel spreadsheets

    I will be very grateful for any pointers any of you can give me.

    Thanks loads in advance.

  2. #2
    Forum Contributor
    Join Date
    04-11-2005
    Location
    London
    Posts
    259
    Interesting. Sorting by a column comprising of formulae should not cause any problem.

    I suspect that it is more likely that you have formatted some of the column as text and some of it as numeric. Try selecting the column, right clicking a cell in the column, selecting format cells and change the format to something consistent.

    HTH
    Martin
    Martin Short

  3. #3
    Registered User
    Join Date
    07-22-2008
    Location
    UK
    Posts
    13
    That was quick! Thanks for your reply Martin.

    I should have posted I have already checked that, in fact the whole spreadsheet is formatted for numbers.

    It doesn't matter if I click the sort button in the bar or go into the Data menu and sort from there.

    There is no header either.

  4. #4
    Registered User
    Join Date
    07-22-2008
    Location
    UK
    Posts
    13
    OK - it appears I have two problems.

    My Excel will not sort ANY column where the cells contain formulae! Only columns with data I input manually
    I have tried this 3 times now on new Workbooks and the result is always the same.

    Solving this will still not help me in my search of how to do this automatically.

    Hmmmmm




    iBook G4

    OS 10.3.9

    Microsoft Excel X (Office X) for Mac

  5. #5
    Forum Contributor
    Join Date
    04-11-2005
    Location
    London
    Posts
    259
    Sorry Keebs I'm fresh out of ideas! I had a look at the Options setting to see if anything could help you. Not a thing.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    If I understand you correctly, you want to sort so that you can do a VLOOKUP on that column? Contrary to popular belief, VLOOKUP does not require that the data be in order if the formula is set up properly. You need FALSE to be your 4th argument.
    Please Login or Register  to view this content.
    I'm still curious as to why you can't sort. What version of Excel are you working with?

    ChemistB

  7. #7
    Registered User
    Join Date
    07-22-2008
    Location
    UK
    Posts
    13
    Thanks Chemist, yes that's the reason for the "sort"

    I am currently using

    Please Login or Register  to view this content.
    to return the the nearest numerical value below the original,and

    Please Login or Register  to view this content.
    to return the next numerical value above, if within 0.2 of the original.

    This works fine as long as D3 to D19 are already numerically sorted, but falls down if they aren't.

    If there's a better way.............

    My version of Excel is from Office X for Mac (2002?)
    Last edited by Keebs; 07-22-2008 at 01:11 PM.

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Ahh, if you're not looking for exact matches then that sort is necessary.

    I know that the MAC version of Excel does have it's little idiosyncrasies but do not use a MAC so can't help you. Maybe we should have a specific folder for MAC users just as we have one for 2007.

    ChemistB

  9. #9
    Registered User
    Join Date
    07-22-2008
    Location
    UK
    Posts
    13

    Solved

    The problem with the sort was the column contained

    Please Login or Register  to view this content.
    and not

    Please Login or Register  to view this content.

+ 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