+ Reply to Thread
Results 1 to 6 of 6

Lookup returns wrong value

  1. #1
    Registered User
    Join Date
    06-21-2006
    Posts
    3

    Lookup returns wrong value

    I have Excel 2000.

    I am having trouble with a lookup returning the wrong value (either VLookup or Lookup). The first column is the output of an IF function where desired outcome results in a specific text or number (I've tried both) and the next column is a text value I wish output. The Lookup value is one unique specific text or number in the first column.

    The table also contains calculations based on a separate variable which determine the result of the IF statement.

    Depending on the variable, the lookup either funtions correctly or it returns the last row's value (even when that is incorrect).

    I need suggestions as to why the Lookup doesn't always work correctly.

    Thanks

    Motorjobs

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Post a example of data please

  3. #3
    Franz Verga
    Guest

    Re: Lookup returns wrong value

    Nel post news:[email protected]
    *motorjobs* ha scritto:

    > I have Excel 2000.
    >
    > I am having trouble with a lookup returning the wrong value (either
    > VLookup or Lookup). The first column is the output of an IF function
    > where desired outcome results in a specific text or number (I've tried
    > both) and the next column is a text value I wish output. The Lookup
    > value is one unique specific text or number in the first column.
    >
    > The table also contains calculations based on a separate variable
    > which determine the result of the IF statement.
    >
    > Depending on the variable, the lookup either funtions correctly or it
    > returns the last row's value (even when that is incorrect).
    >
    > I need suggestions as to why the Lookup doesn't always work correctly.
    >
    > Thanks
    >
    > Motorjobs


    If you could post your formula, maybe we can check what is wrong...


    --
    (I'm not sure of names of menues, option and commands, because
    translating from the Italian version of Excel...)

    Hope I helped you.

    Ciao

    Franz Verga from Italy



  4. #4
    Registered User
    Join Date
    06-21-2006
    Posts
    3

    details to post re incorrect lookup output

    Formulas:
    =VLOOKUP(T1,T4:Z29,3,5)
    =LOOKUP(T1,T4:T29,V4:V29)

    T1=5

    Result us "Year 27" (should be Year 19)

    Table
    0 $2,480 Year 2
    0 $4,718 Year 3
    0 $6,704 Year 4
    0 $8,426 Year 5
    0 $9,871 Year 6
    0 $11,028 Year 7
    0 $11,884 Year 8
    0 $12,425 Year 9
    0 $12,637 Year 10
    0 $12,506 Year 11
    0 $12,014 Year 12
    0 $11,148 Year 13
    0 $9,889 Year 14
    0 $8,220 Year 15
    0 $6,122 Year 16
    0 $3,577 Year 17
    0 $563 Year 18
    5 -$2,939 Year 19
    0 -$6,953 Year 20
    0 -$11,500 Year 21
    0 -$16,605 Year 22
    0 -$22,294 Year 23
    0 -$28,592 Year 24
    0 -$35,527 Year 25
    0 -$43,127 Year 26
    0 -$51,422 Year 27


    Thanks,

    Motorjobs

  5. #5
    Franz Verga
    Guest

    Re: Lookup returns wrong value

    Nel post news:[email protected]
    *motorjobs* ha scritto:

    > Formulas:
    > =VLOOKUP(T1,T4:Z29,3,5)
    > =LOOKUP(T1,T4:T29,V4:V29)
    >
    > T1=5
    >
    > Result us "Year 27" (should be Year 19)
    >

    [cut]

    Try this:

    =VLOOKUP(T1,T4:Z29,3,FALSE)


    (I'm not sure of names of menues, option and commands, because
    translating from the Italian version of Excel...)

    Hope I helped you.

    Ciao

    Franz Verga from Italy



  6. #6
    Registered User
    Join Date
    06-21-2006
    Posts
    3

    Thanks for the help

    Thank you Fanz,

    Your suggestion worked after another correction I had overlooked as well.

    Ciao,

    Motorjob

+ 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