+ Reply to Thread
Results 1 to 10 of 10

VLOOKUP works in some cells but not others.

  1. #1
    amberlodge
    Guest

    VLOOKUP works in some cells but not others.

    Excel 2000

    Really simple data sheet: list of names with homerooms
    Lookup table: list of homerooms with teachers. (named "Range")

    =VLOOKUP(E2,Range,2)

    Some of the cells return the correct name, others #N/A.

    As far as I can tell they are all formatted exactly the same; I've tried
    several different formatting options. The correct ones stay the same; the no
    data ones do not change either.

    Any ideas?



  2. #2
    Ardus Petus
    Guest

    Re: VLOOKUP works in some cells but not others.

    Did you check for extra blanks at the end of your values?

    HTH
    --
    AP

    "amberlodge" <[email protected]> a écrit dans le message
    de news:[email protected]...
    > Excel 2000
    >
    > Really simple data sheet: list of names with homerooms
    > Lookup table: list of homerooms with teachers. (named "Range")
    >
    > =VLOOKUP(E2,Range,2)
    >
    > Some of the cells return the correct name, others #N/A.
    >
    > As far as I can tell they are all formatted exactly the same; I've tried
    > several different formatting options. The correct ones stay the same; the

    no
    > data ones do not change either.
    >
    > Any ideas?
    >
    >




  3. #3
    L. Howard Kittle
    Guest

    Re: VLOOKUP works in some cells but not others.

    The usual suspects:

    Leading or trailing spaces in the lookup column.
    Does the named range contain ALL the data?
    Use the 4th argument as False or 0

    =VLOOKUP(E2,Range,2,0)

    HTH
    Regards,
    Howard

    "amberlodge" <[email protected]> wrote in message
    news:[email protected]...
    > Excel 2000
    >
    > Really simple data sheet: list of names with homerooms
    > Lookup table: list of homerooms with teachers. (named "Range")
    >
    > =VLOOKUP(E2,Range,2)
    >
    > Some of the cells return the correct name, others #N/A.
    >
    > As far as I can tell they are all formatted exactly the same; I've tried
    > several different formatting options. The correct ones stay the same; the
    > no
    > data ones do not change either.
    >
    > Any ideas?
    >
    >




  4. #4
    amberlodge
    Guest

    Re: VLOOKUP works in some cells but not others.

    I just did and could find no extra spaces or blanks. Several names have the
    same homeroom; with some the formula works, with others it doesn't. If I
    paste the lookup value that works into the ones that don't, the formula
    works. Yet the cells were identical. I tried typing the number in from
    scratch and that did not work.

    "Ardus Petus" wrote:

    > Did you check for extra blanks at the end of your values?
    >
    > HTH
    > --
    > AP
    >
    > "amberlodge" <[email protected]> a écrit dans le message
    > de news:[email protected]...
    > > Excel 2000
    > >
    > > Really simple data sheet: list of names with homerooms
    > > Lookup table: list of homerooms with teachers. (named "Range")
    > >
    > > =VLOOKUP(E2,Range,2)
    > >
    > > Some of the cells return the correct name, others #N/A.
    > >
    > > As far as I can tell they are all formatted exactly the same; I've tried
    > > several different formatting options. The correct ones stay the same; the

    > no
    > > data ones do not change either.
    > >
    > > Any ideas?
    > >
    > >

    >
    >
    >


  5. #5
    amberlodge
    Guest

    Re: VLOOKUP works in some cells but not others.

    I checked for spaces - there were none that I could find. I tried typing in
    the data from scratch - no good. Copying and pasting from those cells that
    did work into the (identical) cells that didn't, caused the formula to return
    the correct value. But I still have homerooms that have never given a correct
    value. Even true, false, and 0 don't help in the fourth argument.

    The range contains all the data - it's not very big - just 44 rows.

    "L. Howard Kittle" wrote:

    > The usual suspects:
    >
    > Leading or trailing spaces in the lookup column.
    > Does the named range contain ALL the data?
    > Use the 4th argument as False or 0
    >
    > =VLOOKUP(E2,Range,2,0)
    >
    > HTH
    > Regards,
    > Howard
    >
    > "amberlodge" <[email protected]> wrote in message
    > news:[email protected]...
    > > Excel 2000
    > >
    > > Really simple data sheet: list of names with homerooms
    > > Lookup table: list of homerooms with teachers. (named "Range")
    > >
    > > =VLOOKUP(E2,Range,2)
    > >
    > > Some of the cells return the correct name, others #N/A.
    > >
    > > As far as I can tell they are all formatted exactly the same; I've tried
    > > several different formatting options. The correct ones stay the same; the
    > > no
    > > data ones do not change either.
    > >
    > > Any ideas?
    > >
    > >

    >
    >
    >


  6. #6
    Peo Sjoblom
    Guest

    Re: VLOOKUP works in some cells but not others.

    Change the lookup formula to


    =VLOOKUP(E2,Range,2,0)

    if you still have the same problem and if there are no invisible characters
    then there must be numbers involved where one set are seen as number and one
    as text, just do this

    =ISTEXT(Cell1)

    =ISTEXT(Cell2)

    where the first one is the lookup value cell and the second one cell in the
    table that returns an error

    if you get TRUE in one of these (probably the second) copy an empty cell,
    select all the room numbers
    and do edit>paste special and select add




    --

    Regards,

    Peo Sjoblom

    http://nwexcelsolutions.com


    "amberlodge" <[email protected]> wrote in message
    news:[email protected]...
    >I just did and could find no extra spaces or blanks. Several names have
    >the
    > same homeroom; with some the formula works, with others it doesn't. If I
    > paste the lookup value that works into the ones that don't, the formula
    > works. Yet the cells were identical. I tried typing the number in from
    > scratch and that did not work.
    >
    > "Ardus Petus" wrote:
    >
    >> Did you check for extra blanks at the end of your values?
    >>
    >> HTH
    >> --
    >> AP
    >>
    >> "amberlodge" <[email protected]> a écrit dans le
    >> message
    >> de news:[email protected]...
    >> > Excel 2000
    >> >
    >> > Really simple data sheet: list of names with homerooms
    >> > Lookup table: list of homerooms with teachers. (named "Range")
    >> >
    >> > =VLOOKUP(E2,Range,2)
    >> >
    >> > Some of the cells return the correct name, others #N/A.
    >> >
    >> > As far as I can tell they are all formatted exactly the same; I've
    >> > tried
    >> > several different formatting options. The correct ones stay the same;
    >> > the

    >> no
    >> > data ones do not change either.
    >> >
    >> > Any ideas?
    >> >
    >> >

    >>
    >>
    >>




  7. #7
    amberlodge
    Guest

    Re: VLOOKUP works in some cells but not others.

    Thanks for your replies. I did try 0 in the fourth argument. No good. But I
    was checking for spaces and clicked in front of several of the homeroom
    values in my table, which caused them to be right-justified instead of left
    (thus changing the format?) and the formulas that were working gave values of
    #N/A. I left-justified them again and now the entire dtatbase is fine. I have
    no idea what I did to clear up the problem, but I all the variations of the
    formula that I was trying work now.

    "Peo Sjoblom" wrote:

    > Change the lookup formula to
    >
    >
    > =VLOOKUP(E2,Range,2,0)
    >
    > if you still have the same problem and if there are no invisible characters
    > then there must be numbers involved where one set are seen as number and one
    > as text, just do this
    >
    > =ISTEXT(Cell1)
    >
    > =ISTEXT(Cell2)
    >
    > where the first one is the lookup value cell and the second one cell in the
    > table that returns an error
    >
    > if you get TRUE in one of these (probably the second) copy an empty cell,
    > select all the room numbers
    > and do edit>paste special and select add
    >
    >
    >
    >
    > --
    >
    > Regards,
    >
    > Peo Sjoblom
    >
    > http://nwexcelsolutions.com
    >
    >
    > "amberlodge" <[email protected]> wrote in message
    > news:[email protected]...
    > >I just did and could find no extra spaces or blanks. Several names have
    > >the
    > > same homeroom; with some the formula works, with others it doesn't. If I
    > > paste the lookup value that works into the ones that don't, the formula
    > > works. Yet the cells were identical. I tried typing the number in from
    > > scratch and that did not work.
    > >
    > > "Ardus Petus" wrote:
    > >
    > >> Did you check for extra blanks at the end of your values?
    > >>
    > >> HTH
    > >> --
    > >> AP
    > >>
    > >> "amberlodge" <[email protected]> a écrit dans le
    > >> message
    > >> de news:[email protected]...
    > >> > Excel 2000
    > >> >
    > >> > Really simple data sheet: list of names with homerooms
    > >> > Lookup table: list of homerooms with teachers. (named "Range")
    > >> >
    > >> > =VLOOKUP(E2,Range,2)
    > >> >
    > >> > Some of the cells return the correct name, others #N/A.
    > >> >
    > >> > As far as I can tell they are all formatted exactly the same; I've
    > >> > tried
    > >> > several different formatting options. The correct ones stay the same;
    > >> > the
    > >> no
    > >> > data ones do not change either.
    > >> >
    > >> > Any ideas?
    > >> >
    > >> >
    > >>
    > >>
    > >>

    >
    >
    >


  8. #8
    Duke Carey
    Guest

    RE: VLOOKUP works in some cells but not others.

    After reading the messages back & forth I'm wondering if the name "Range"
    uses absolute or relative addresses. Go to Insert>Names>Define and make sure
    the definition has $ signs in the addresses

    "amberlodge" wrote:

    > Excel 2000
    >
    > Really simple data sheet: list of names with homerooms
    > Lookup table: list of homerooms with teachers. (named "Range")
    >
    > =VLOOKUP(E2,Range,2)
    >
    > Some of the cells return the correct name, others #N/A.
    >
    > As far as I can tell they are all formatted exactly the same; I've tried
    > several different formatting options. The correct ones stay the same; the no
    > data ones do not change either.
    >
    > Any ideas?
    >
    >


  9. #9
    Peo Sjobom
    Guest

    Re: VLOOKUP works in some cells but not others.

    If they are left aligned they are text

    --

    Regards,

    Peo Sjoblom

    Excel 95 - Excel 2007
    Nothwest Excel Solutions
    www.nwexcelsolutions.com
    "It is a good thing to follow the first law of holes;
    if you are in one stop digging." Lord Healey


    "amberlodge" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks for your replies. I did try 0 in the fourth argument. No good. But
    > I
    > was checking for spaces and clicked in front of several of the homeroom
    > values in my table, which caused them to be right-justified instead of
    > left
    > (thus changing the format?) and the formulas that were working gave values
    > of
    > #N/A. I left-justified them again and now the entire dtatbase is fine. I
    > have
    > no idea what I did to clear up the problem, but I all the variations of
    > the
    > formula that I was trying work now.
    >
    > "Peo Sjoblom" wrote:
    >
    >> Change the lookup formula to
    >>
    >>
    >> =VLOOKUP(E2,Range,2,0)
    >>
    >> if you still have the same problem and if there are no invisible
    >> characters
    >> then there must be numbers involved where one set are seen as number and
    >> one
    >> as text, just do this
    >>
    >> =ISTEXT(Cell1)
    >>
    >> =ISTEXT(Cell2)
    >>
    >> where the first one is the lookup value cell and the second one cell in
    >> the
    >> table that returns an error
    >>
    >> if you get TRUE in one of these (probably the second) copy an empty cell,
    >> select all the room numbers
    >> and do edit>paste special and select add
    >>
    >>
    >>
    >>
    >> --
    >>
    >> Regards,
    >>
    >> Peo Sjoblom
    >>
    >> http://nwexcelsolutions.com
    >>
    >>
    >> "amberlodge" <[email protected]> wrote in message
    >> news:[email protected]...
    >> >I just did and could find no extra spaces or blanks. Several names have
    >> >the
    >> > same homeroom; with some the formula works, with others it doesn't. If
    >> > I
    >> > paste the lookup value that works into the ones that don't, the formula
    >> > works. Yet the cells were identical. I tried typing the number in from
    >> > scratch and that did not work.
    >> >
    >> > "Ardus Petus" wrote:
    >> >
    >> >> Did you check for extra blanks at the end of your values?
    >> >>
    >> >> HTH
    >> >> --
    >> >> AP
    >> >>
    >> >> "amberlodge" <[email protected]> a écrit dans le
    >> >> message
    >> >> de news:[email protected]...
    >> >> > Excel 2000
    >> >> >
    >> >> > Really simple data sheet: list of names with homerooms
    >> >> > Lookup table: list of homerooms with teachers. (named "Range")
    >> >> >
    >> >> > =VLOOKUP(E2,Range,2)
    >> >> >
    >> >> > Some of the cells return the correct name, others #N/A.
    >> >> >
    >> >> > As far as I can tell they are all formatted exactly the same; I've
    >> >> > tried
    >> >> > several different formatting options. The correct ones stay the
    >> >> > same;
    >> >> > the
    >> >> no
    >> >> > data ones do not change either.
    >> >> >
    >> >> > Any ideas?
    >> >> >
    >> >> >
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




  10. #10
    Registered User
    Join Date
    03-23-2006
    Location
    Malaysia
    Posts
    47
    Maybe this..

    =VLOOKUP(E2,Range,2,FALSE)

+ 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