Consulting

Results 1 to 3 of 3

Thread: Double lookup

  1. #1
    VBAX Regular
    Joined
    Oct 2007
    Posts
    13
    Location

    Double lookup

    Ok,
    I have an excel file with multiple worksheets, each with a table with different prices based on measurements. The row and column headings are the measurements. On the last sheet I have a drop-down box that lists the names of the worksheets for the user to select. On that last sheet there is a place where the person using the sheet can enter the measurements they take, and I want the sheet to take the measurements they enter, and the drop-down item they select, and pull the correct value from the correct worksheet. I have been trying to do it with index and match in the worksheet itself, but that gets messy. vlookup doesn't seem to work, either. I have attached what I have so far for your perusal. Any help would be greatly appreciated. Thanks!

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Try

    =INDEX(INDIRECT("'"&$G$4&"'!A1:N15"),MATCH($E5,INDIRECT("'"&$G$4&"'!A1:A15" ),0),MATCH($C5,INDIRECT("'"&$G$4&"'!A1:N1"),0))
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular
    Joined
    Oct 2007
    Posts
    13
    Location
    Thanks for the quick reply. That is almost what I need. I put it into my spread sheet, and it worked fine if the values in C5 and E5 exactly matched the width or height in the tables. So, I changed the last argument in the MATCH function to 1, but it rounds the numbers down, not up. I need it to increment to the next highest number, not the next lowest. Is this possible? Thanks again for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •