+ Reply to Thread
Results 1 to 9 of 9

2 variable lookup but within a table not column

  1. #1
    Registered User
    Join Date
    09-18-2012
    Location
    San Diego
    MS-Off Ver
    Excel 2010
    Posts
    7

    Question 2 variable lookup but within a table not column

    I'm working on a lookup for wire size and conduit fill and am having trouble. I'm trying to use the index() with the match() formulas. For example:

    EXCEL.png

    Far left column is wire size. Top row is conduit size. The body is the number of wires that will fit in each conduit size for a given wire size.

    I want to provide the wire size (far left column), and number of wires (body of the array), and come up with the conduit size (the top row).

    For example, I know I need 5 qty #14 wire, but don't know what size conduit. I need to match a value that is equal or greater 5 in row 2 (where the 14 wire is), and return the value in row 1.

    Is that clear?

    Thanks for any help in advance!! This is killing me!
    Attached Images Attached Images

  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: 2 variable lookup but within a table not column

    please attach a work book,
    "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
    09-18-2012
    Location
    San Diego
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: 2 variable lookup but within a table not column

    Book1.xlsx

    Thanks!

  4. #4
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: 2 variable lookup but within a table not column

    Assuming Wire Size is in cell B10, and Number of Wires is in B11, try:

    Please Login or Register  to view this content.
    Note - Ranges may need to be adjusted since your png does not accurately display row/column numbers/letters.
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  5. #5
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: 2 variable lookup but within a table not column

    Adjusted after seeing the sample sheet:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    09-18-2012
    Location
    San Diego
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: 2 variable lookup but within a table not column

    Quote Originally Posted by ConneXionLost View Post
    Adjusted after seeing the sample sheet:

    Please Login or Register  to view this content.
    That worked perfectly -- can you explain what you're doing here? I'm not quite following. I see you reference column 1 in the array in the beginning, but what's going on with the if(min(index... part?

    Thank you so much!

  7. #7
    Registered User
    Join Date
    09-18-2012
    Location
    San Diego
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: 2 variable lookup but within a table not column

    i've revised the spreadsheet, I pulled a piece out thinking that I could apply it to the whole thing, but I have some wire sizing that's "1/0" and it seems to be messing up the calculation (returns an "N/A"). I've attached a revised spreadsheet. I tried to reference a different sheet like i'm doing in my actual spreadsheet, but somethings messed up.

    Thanks again for your help.

    Here's the spreadsheet Book1.xlsx

  8. #8
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: 2 variable lookup but within a table not column

    Hi Kevin,

    You had some problems changing the formula. Try this:

    Please Login or Register  to view this content.
    You also have some data type mismatches that are causing problems. I recommend you force all your wire size references to be text by inserting a single apostrophe in front of the numbers.

  9. #9
    Registered User
    Join Date
    09-18-2012
    Location
    San Diego
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: 2 variable lookup but within a table not column

    Awesome that worked! Forcing everything to text fixed all my errors (with the above formula) and I was able to transfer it to my master spreadsheet. The only minor change I had to make was the Column() function needed the "$"'s .

    Thank you! This is going to save a bunch of time having to look up conduit sizes every time I re-size wire! AWESOME!

+ 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