+ Reply to Thread
Results 1 to 5 of 5

Pulling a number from a list

  1. #1
    Registered User
    Join Date
    06-20-2012
    Location
    Nassau, Bahamas
    MS-Off Ver
    Excel for Mac 2011
    Posts
    3

    Pulling a number from a list

    Building an airline computerized loadsheet and running into a problem with the numbers. If we have 1413 pounds of baggage in the forward hold, I want to reference a list of numbers that correspond to the weight with a built in index. Therefore, I have no problem using VLOOKUP to pull the exact number over, but want instead to not really round up, but grab the next highest number as we must always be MORE conservative and not less. The aircraft can be under the legal recorded value but never over.

    I have attached my file for those willing or familiar enough to help me. After searching the forum all night, nothing tried that my skill level can comprehend is working. This seems to be the best way to get help.

    In my file the value from B36 is used to reference the list on sheet!2 O4:P37.

    Any help will be appreciated.
    Attached Files Attached Files

  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: Pulling a number from a list

    can it be equal? if you want to get the next highest use match instead and add 1 to the match result
    =INDEX(Sheet2!P4:P37,MATCH(B36,Sheet2!P4:P37,1)+1)
    "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
    06-20-2012
    Location
    Nassau, Bahamas
    MS-Off Ver
    Excel for Mac 2011
    Posts
    3

    Re: Pulling a number from a list

    That formulae did the trick. To answer your question, it will never be equal as there is the corresponding index to deal with. As an example, its like positions on a see saw, the farther out from the pivot the more force the weight will have. Same as the bags. The fwd hold and aft hold both control weights and moments. So there would never be a straight 1400 to correspond with 1400 pounds or kilos of baggage. It will always have a corresponding index to show how far along the see saw it is!

  4. #4
    Registered User
    Join Date
    06-20-2012
    Location
    Nassau, Bahamas
    MS-Off Ver
    Excel for Mac 2011
    Posts
    3

    Re: Pulling a number from a list

    Found another issue, if baggage weights are less than 100 where the list starts from returns the #REF flag. I'm thinking the correct thing to do is add the conditional function of IF=<100 then return the number in the first section of the list. 99.8

  5. #5
    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,946

    Re: Pulling a number from a list

    if that seems have fixed the problem, and you have tested a few different senarios, then it sounds like that is the fix you need
    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

+ 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