+ Reply to Thread
Results 1 to 5 of 5

Not Able to Get LOOKUP to Return Correct Data

  1. #1
    Registered User
    Join Date
    11-12-2009
    Location
    Kansas City
    MS-Off Ver
    Excel 2007
    Posts
    1

    Not Able to Get LOOKUP to Return Correct Data

    I'm creating a spreadsheet for a concrete formwork course, and in order to do it I need to have the user input which size of lumber they are using (2x4, 4x4, etc.)

    The function I'm having trouble with is

    =IF(B16="S4S",LOOKUP(A31,Tables!A27:A65,Tables!C27:C65),LOOKUP(A31,Tables!A27:A65,Tables!B27:B65))
    I want the user to be able to type in the size of the lumber, and whether its "Rough" or "S4S" and then have the spread sheet look up certain values like Area, Section Modulus, etc.

    However, whenever I try it, the function doesn't always return the right values for the lumber. For instance, I'll put in 2x4 for input cell, but it'll put out values for a 2x12.

    Sorry this is hard to explain, but I've attached the spreadsheet. The problem is under the 'Slab Form' tab. You input the lumber size in B13, and B31 is where the function is, and it should look up the values under the 'Tables' tab, under 'Board Properties.'

    I'd appreciate any help you can offer

    Thanks!
    Attached Files Attached Files
    Last edited by ngoedken; 11-12-2009 at 06:25 PM. Reason: Title

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Lookup

    Try

    =IF(B16="S4S", VLOOKUP(A31, Tables!A27:C65, 3, False), VLOOKUP(A31, Tables!A27:B65, 2, False))
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: Not Able to Get LOOKUP to Return Correct Data

    Or a slightly shorter version: =VLOOKUP(A31,Tables!A27:C65,IF(B16="S4S",3,2),0)

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Not Able to Get LOOKUP to Return Correct Data

    Much better.

  5. #5
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Not Able to Get LOOKUP to Return Correct Data

    Not as short as darkyam's, but without IF

    =INDEX(Tables!A26:C65,MATCH(A31,Tables!A26:A65,0),MATCH($B$16,Tables!A26:C26,0))

+ 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