Results 1 to 8 of 8

LOOKUP Gives Wrong Value?

Threaded View

  1. #1
    Registered User
    Join Date
    03-25-2013
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2007
    Posts
    4

    LOOKUP Gives Wrong Value?

    Hello,

    I'm using LOOKUP to do something simple, but it appears to be giving a wrong (or I should say, at least unexpected) result some of the time.

    I have a simple table where row 1 has four names in cols A through D (say "First", "Second", "Third", and "Fourth"). In rows 2 through 16, I have placed an "X" in one or more of the cells in each row. I followed a binary pattern to account for all combinations of X. For example row 2 has blank,blank,blank,X. Row 12 has X,blank,X,X. Row 16 has X,X,X,X.

    In col E, for each row 2 through 16, I have the following formula:

    =LOOKUP("X",A2:D2,$A$1:$D$1)

    Every row in col E gives me the right answer except for two:
    row 6 (blank,X,blank,X) gives me "Second" where I expected "Fourth".
    row 14 (X,X,blank,X) gives me "Second" where I expected "Fourth".

    I don't understand this as there are other rows with blanks in col C, yet it returns what I expect. For example:
    row 10 (X,blank,blank,X) gives the expected value of "Fourth".

    I tried this with MATCH too, and those same two locations give me the same unexpected index.

    Can someone please explain this? I just want to get the col value in the first row that corresponds to the last "X" in each row.

    Thanks, and sorry this description is so long. Harder to explain than to just look at!
    Tony
    Attached Images Attached Images

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