+ Reply to Thread
Results 1 to 9 of 9

vlookup in descending order

  1. #1
    Registered User
    Join Date
    10-01-2009
    Location
    stoke
    MS-Off Ver
    Excel 2003
    Posts
    11

    Smile vlookup in descending order

    Hi guys. Fancy something to get your teeth into?

    Im running a workbook that has a list of all the runs for a day, and several daily driver sheets that automatically copy and order the drops using vlookup.

    If you look at run 1 on the run listing you will see that holmfirth is the first drop and sandbach is the last drop.
    This is also the case on page 1, as it should be.

    However, on run 7 you will see that the first drop is Edinburgh and the last drop is Biggar.
    The problem is that on the run listing form, we sort the run backwards so that it is loaded onto the trunk wagon backwards, then the load is tran-shipped (swapped) to the delivery wagon (dont ask) and the last drop on the trunk wagon (Biggar on the front end) becomes the first drop(on the back end) on the delivery wagon now in the correct delivery order. I need the daily sheet (page 7) to reflect the fact that Biggar is the first drop and Edinburgh is the last drop.

    Hope this helps.

    Colin
    Attached Files Attached Files
    Last edited by NBVC; 03-01-2010 at 09:44 AM. Reason: not clear

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: vlookup in descending order

    I am not 100% clear on the dilemma.. what should we see, where and why?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    10-01-2009
    Location
    stoke
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: vlookup in descending order

    Sorry for not being clear, I have re typed first message
    Last edited by thebigmancometh; 02-17-2010 at 04:59 AM.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: vlookup in descending order

    In sheet 7, A14 enter:

    =IF(ISNUMBER(MATCH(A13+1,'Run Listing'!$A$63:$A$80,0)),A13+1,"")

    copied down... this avoids the errors at the bottom so you don't need to conditionally format, which takes up unnecessary resources.

    Then in B14, try:

    =IF($A14="","",VLOOKUP(LARGE($A$14:$A$31,ROWS($A$14:$A14)),Run7,2,0))

    copied down

    in C14:

    =IF($A14="","",VLOOKUP(LARGE($A$14:$A$31,ROWS($A$14:$A14)),Run7,3,0))

    copied down.

    You can adapt to other sheets and replace other Vlookups in the same sheet to include the =IF($A14="","".... part so you can remove errors and conditional formatting...

  5. #5
    Registered User
    Join Date
    10-01-2009
    Location
    stoke
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: vlookup in descending order

    thankyou, i will give it a try this weekend.
    thanks again

  6. #6
    Registered User
    Join Date
    10-01-2009
    Location
    stoke
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: vlookup in descending order

    Oh!!! just had another thought.
    If i had a collection in the middle of the run and wanted to highlight it, lets say by putting in "COL" on the listing page and highlighting the copied cell in bold red on page 7

    Ive cheated on the sheet attached, but can I go into format - conditional format in the normal manner or is it a little more involved?

    Kind Regards

    Colin
    Attached Files Attached Files
    Last edited by thebigmancometh; 02-17-2010 at 11:20 AM.

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: vlookup in descending order

    After selecting the range, go to conditional formatting and select Cell Value is >> Equal to >> and enter ="COL"

    Then format as Red font.

  8. #8
    Registered User
    Join Date
    10-01-2009
    Location
    stoke
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: vlookup in descending order

    Thats fantastic, i will give it a go this week end

  9. #9
    Registered User
    Join Date
    10-01-2009
    Location
    stoke
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: vlookup in descending order

    It worked!!!! thank v.v.v.v.much. Job done

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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