+ Reply to Thread
Results 1 to 11 of 11

my lookup table gets confused?

  1. #1
    Registered User
    Join Date
    10-15-2017
    Location
    canada
    MS-Off Ver
    2010
    Posts
    7

    my lookup table gets confused?

    i use a 9 row look up table for my invoice sheet, for some reason when I select a value from my drop down list it doesn't always find the corresponding value. it always find a value.. just not always the adjacent value. for example if I select the D47 value the lookup table presents the E53 value.. it should be D47 =E47 as per my table

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,624

    Re: my lookup table gets confused?

    (How to) Upload a Workbook directly to the Forum
    (please do not post pictures or links to worksheets)
    • Click Advanced next to Quick Post button at the bottom right of the editor box.
    • Scroll down until you see "Manage Attachments",
    • Click the "Choose" button at the upper left (upload from your computer).
    • Select your file, click "open", click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Close the Attachment Manager window.
    • Click "Submit Reply"
    Note: Please do not attach password protected workbooks/worksheets
    Ensure to disable any Workbook Open/Autorun macros before attaching!
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    10-15-2017
    Location
    canada
    MS-Off Ver
    2010
    Posts
    7

    Re: my lookup table gets confused?

    the options for the drop down lists are in the same column down in the 40s rows. C & D are the drop down options and E is the list of values I need to pop up depending on my D selection

    example: if D6=windsor E6 should automatically =12.00 (for some reason its 6.00 though..)
    Attached Files Attached Files
    Last edited by xtcking; 10-15-2017 at 03:51 PM.

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,624

    Re: my lookup table gets confused?

    Lookup needs a single cell for the lookup value not a range:
    Please Login or Register  to view this content.
    You need the "$" with $D$44:$D$53,$E$44:$E$53 to anchor the addresses so that they don't increment as you drag the formula down the rows.

    To avoid the #NA errors use:
    column E:
    Please Login or Register  to view this content.
    column G:
    Please Login or Register  to view this content.
    Last edited by protonLeah; 10-15-2017 at 04:28 PM.

  5. #5
    Registered User
    Join Date
    10-15-2017
    Location
    canada
    MS-Off Ver
    2010
    Posts
    7
    Quote Originally Posted by protonLeah View Post
    Lookup needs a single cell for the lookup value not a range:
    Please Login or Register  to view this content.
    You need the "$" with $D$44:$D$53,$E$44:$E$53 to anchor the addresses so that they don't increment as you drag the formula down the rows.

    To avoid the #NA errors use:
    column E:
    Please Login or Register  to view this content.
    column G:
    Please Login or Register  to view this content.

    So all I have to do is add the $ to my current code?

  6. #6
    Registered User
    Join Date
    10-15-2017
    Location
    canada
    MS-Off Ver
    2010
    Posts
    7

    Re: my lookup table gets confused?

    Thank you so much for the IF statements, they made it look so much better. however Im still having trouble with a random value popping into E when selecting in the D column

  7. #7
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,624

    Re: my lookup table gets confused?

    The values in lookup_vector must be placed in ascending order: ...,-2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE; otherwise, LOOKUP may not give the correct value. Uppercase and lowercase text are equivalent.

    Notice in the attachment, that I have used named ranges as follows:
    Destination =Sheet1!$D$44:$D$52
    RateList =Sheet1!$E$44:$E$52


    So the formula in column E is:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by protonLeah; 10-15-2017 at 06:19 PM.

  8. #8
    Registered User
    Join Date
    10-15-2017
    Location
    canada
    MS-Off Ver
    2010
    Posts
    7

    Re: my lookup table gets confused?

    edit: unessasary post
    Attached Files Attached Files
    Last edited by xtcking; 10-15-2017 at 07:09 PM.

  9. #9
    Registered User
    Join Date
    10-15-2017
    Location
    canada
    MS-Off Ver
    2010
    Posts
    7

    Re: my lookup table gets confused?

    alright, I looked through your upload. my biggest question is.. how did you bind the 9 destination options in the E forumla simply as Desination and same with rate list

  10. #10
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,624

    Re: my lookup table gets confused?

    There are several ways:
    1. Select the cells to be named, e.g. D44:D52, then type the desired name into the Name Box, or

    2. Select the cells, click formulas tab on the ribbon, Define Name on the ribbon type the desired name in the New Name dialog.

  11. #11
    Registered User
    Join Date
    06-11-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: my lookup table gets confused?

    You could also use a Vlookup. It's a vertical lookup. Commas separate out the requirements.

    "vlookup(D6,$D$44:$E$52,2,false)" the first part is what you want to find/match with. The second part is the range you are trying to find that value in. The dollar sign anchors the reference point. The first in on the cell column the second is on the row. You can use F4 to toggle between the anchor options. The third is the column identifier value you want to return when you have a match. The last is either true or false (1/0). This says to either bring back only exact matches (false) or closest match (true). If false and no match it will show an #N/A error message.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 10-03-2012, 10:32 PM
  2. [SOLVED] Macro executes but not giving results :confused::confused::confused:
    By Ganesh7299 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2012, 10:49 AM
  3. Confused- Should I use Lookup, Match, Index?
    By jmk8602 in forum Excel General
    Replies: 2
    Last Post: 11-17-2011, 04:11 PM
  4. Confused Search or Match Lookup or index
    By grouchmax in forum Excel General
    Replies: 10
    Last Post: 01-28-2011, 12:26 PM
  5. Confused on method to lookup using 3 - 6 criteria
    By lukep10 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-16-2008, 02:47 PM
  6. VBA match, index, lookup... confused
    By strixy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-16-2007, 07:30 PM
  7. Confused on lookup formulas. Any Help?
    By Aranon in forum Excel General
    Replies: 11
    Last Post: 11-28-2006, 12:29 AM

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