+ Reply to Thread
Results 1 to 5 of 5

Sorting formula results

  1. #1
    Registered User
    Join Date
    12-06-2006
    Posts
    13

    Sorting formula results

    I have a column of vlookup formulas, and when a match is found the output is a corresponding number, when no match is found the box will remain blank. In the next column I would like to sort the results, I know I can manually copy the column and paste values, then sort the column, but since I have to re-import data columns I would like to automate this.


    Is there a way to take the output value from a formula field and then have them sorted in the following column?

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Sorting formula results

    how do you want them sorted?
    you could simply use =large(b1:b10,1), =large(b1:10,2)......
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    12-06-2006
    Posts
    13

    Re: Sorting formula results

    This works great, with one exception.

    =large(b$1:b$5000,1)
    =large(b$1:b$5000,2)
    =large(b$1:b$5000,3)
    =large(b$1:b$5000,x)

    This column has a thousand results and it would appear that auto fill is not incrementing that count number (x). Is there a way I can fill this down and auto-increment?

    -Somewhat answered my own question, I created a column E filled from 1-1000 and changed the formula to:

    =large(b$1:b$5000,E1)

    I can fill this down to auto increment:

    =large(b$1:b$5000,E1)
    =large(b$1:b$5000,E2)
    =large(b$1:b$5000,E3)
    =large(b$1:b$5000,E4)


    Is there a better way to do this? (This works fine, I just like to know options for future development)

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Sorting formula results

    =large(b$1:b$5000,rows($a$1:a1))
    rows($x$1:x1) =1 dragged down becomes
    rows($x$1:x2) ie =2

  5. #5
    Registered User
    Join Date
    12-06-2006
    Posts
    13

    Re: Sorting formula results

    Aaaah, it's counting the number of rows in the range. It took me a while, but I got it.

    Thanks very much!

+ 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