+ Reply to Thread
Results 1 to 11 of 11

vlookup-When using the data in a cell as a reference for a vlookup

  1. #1
    R D S
    Guest

    vlookup-When using the data in a cell as a reference for a vlookup

    When using the data in a cell as a reference for a vlookup how do I only
    consider the first three characters in that cell.

    ie,
    =VLOOKUP(A1,A1:B10,2,FALSE)
    but I only want to consider the first three characters in A1

    Thanks,
    Rick



  2. #2
    Dave Peterson
    Guest

    re: vlookup-When using the data in a cell as a reference for a vlookup

    =vlookup(left(a1,3),a1:b10,2,false)

    Although, your look up range (a1:b10) looks kind of strange to me.)

    Didn't you get a circular reference error when you tried this?
    (maybe A2:B10 or even sheet2!a1:b10???)



    R D S wrote:
    >
    > When using the data in a cell as a reference for a vlookup how do I only
    > consider the first three characters in that cell.
    >
    > ie,
    > =VLOOKUP(A1,A1:B10,2,FALSE)
    > but I only want to consider the first three characters in A1
    >
    > Thanks,
    > Rick


    --

    Dave Peterson

  3. #3
    Alan Beban
    Guest

    re: vlookup-When using the data in a cell as a reference for a vlookup

    Dave Peterson wrote:
    > =vlookup(left(a1,3),a1:b10,2,false)
    >
    > Although, your look up range (a1:b10) looks kind of strange to me.)
    >
    > Didn't you get a circular reference error when you tried this?
    > (maybe A2:B10 or even sheet2!a1:b10???)
    >
    >
    >
    > R D S wrote:
    >
    >>When using the data in a cell as a reference for a vlookup how do I only
    >>consider the first three characters in that cell.
    >>
    >>ie,
    >>=VLOOKUP(A1,A1:B10,2,FALSE)
    >>but I only want to consider the first three characters in A1
    >>
    >>Thanks,
    >>Rick

    >
    >


    Dave Peterson's comment is puzzling.

    =VLOOKUP(LEFT(A1,3)&"*",A1:B10,2,FALSE)

    Alan Beban

  4. #4
    Dave Peterson
    Guest

    re: vlookup-When using the data in a cell as a reference for a vlookup

    'Cause I put it in A1!!!!

    (watta dope!)



    Alan Beban wrote:

    >
    > Dave Peterson's comment is puzzling.
    >
    > =VLOOKUP(LEFT(A1,3)&"*",A1:B10,2,FALSE)
    >
    > Alan Beban


    --

    Dave Peterson

  5. #5
    R D S
    Guest

    re: vlookup-When using the data in a cell as a reference for a vlookup

    Yes sorry I relayed it incorrectly, the lookup goes between two sheets.
    Thanks for the fix though.

    Rick

    "Dave Peterson" <[email protected]> wrote in message
    news:[email protected]...
    > =vlookup(left(a1,3),a1:b10,2,false)
    >
    > Although, your look up range (a1:b10) looks kind of strange to me.)
    >
    > Didn't you get a circular reference error when you tried this?
    > (maybe A2:B10 or even sheet2!a1:b10???)
    >
    >
    >
    > R D S wrote:
    > >
    > > When using the data in a cell as a reference for a vlookup how do I only
    > > consider the first three characters in that cell.
    > >
    > > ie,
    > > =VLOOKUP(A1,A1:B10,2,FALSE)
    > > but I only want to consider the first three characters in A1
    > >
    > > Thanks,
    > > Rick

    >
    > --
    >
    > Dave Peterson




  6. #6
    Alan Beban
    Guest

    re: vlookup-When using the data in a cell as a reference for a vlookup

    Huh? And I thought Dave Peterson's comment was puzzling!

    Alan Beban

    R D S wrote:
    > Yes sorry I relayed it incorrectly, the lookup goes between two sheets.
    > Thanks for the fix though.
    >
    > Rick
    >
    > "Dave Peterson" <[email protected]> wrote in message
    > news:[email protected]...
    >
    >>=vlookup(left(a1,3),a1:b10,2,false)
    >>
    >>Although, your look up range (a1:b10) looks kind of strange to me.)
    >>
    >>Didn't you get a circular reference error when you tried this?
    >>(maybe A2:B10 or even sheet2!a1:b10???)
    >>
    >>
    >>
    >>R D S wrote:
    >>
    >>>When using the data in a cell as a reference for a vlookup how do I only
    >>>consider the first three characters in that cell.
    >>>
    >>>ie,
    >>>=VLOOKUP(A1,A1:B10,2,FALSE)
    >>>but I only want to consider the first three characters in A1
    >>>
    >>>Thanks,
    >>>Rick

    >>
    >>--
    >>
    >>Dave Peterson

    >
    >
    >


  7. #7
    Dave Peterson
    Guest

    re: vlookup-When using the data in a cell as a reference for a vlookup

    My puzzling comment was caused by a stupid error on my part (I put the formula
    in A1).

    But I read the OP's original question to ignore everything after the first three
    characters to mean that the table was laid out like:

    abc 1
    bcd 2
    cde 3
    def 4

    And the value in A1 looked like: abc-1234-asdf.

    ==
    On the other hand, maybe the OP tried both responses, liked yours better and
    just said thanks in one message.

    Alan Beban wrote:
    >
    > Huh? And I thought Dave Peterson's comment was puzzling!
    >
    > Alan Beban
    >
    > R D S wrote:
    > > Yes sorry I relayed it incorrectly, the lookup goes between two sheets.
    > > Thanks for the fix though.
    > >
    > > Rick
    > >
    > > "Dave Peterson" <[email protected]> wrote in message
    > > news:[email protected]...
    > >
    > >>=vlookup(left(a1,3),a1:b10,2,false)
    > >>
    > >>Although, your look up range (a1:b10) looks kind of strange to me.)
    > >>
    > >>Didn't you get a circular reference error when you tried this?
    > >>(maybe A2:B10 or even sheet2!a1:b10???)
    > >>
    > >>
    > >>
    > >>R D S wrote:
    > >>
    > >>>When using the data in a cell as a reference for a vlookup how do I only
    > >>>consider the first three characters in that cell.
    > >>>
    > >>>ie,
    > >>>=VLOOKUP(A1,A1:B10,2,FALSE)
    > >>>but I only want to consider the first three characters in A1
    > >>>
    > >>>Thanks,
    > >>>Rick
    > >>
    > >>--
    > >>
    > >>Dave Peterson

    > >
    > >
    > >


    --

    Dave Peterson

  8. #8
    Alan Beban
    Guest

    re: vlookup-When using the data in a cell as a reference for a vlookup

    My thought was that the table was laid out

    abc1 1
    abc2 2
    xyz27 3
    abc3 4

    But on reflection *that* now seems to me kind of silly . . . I think.

    Oh well!

    Alan Beban

    Dave Peterson wrote:
    > My puzzling comment was caused by a stupid error on my part (I put the formula
    > in A1).
    >
    > But I read the OP's original question to ignore everything after the first three
    > characters to mean that the table was laid out like:
    >
    > abc 1
    > bcd 2
    > cde 3
    > def 4
    >
    > And the value in A1 looked like: abc-1234-asdf.
    >
    > ==
    > On the other hand, maybe the OP tried both responses, liked yours better and
    > just said thanks in one message.
    >
    > Alan Beban wrote:
    >
    >>Huh? And I thought Dave Peterson's comment was puzzling!
    >>
    >>Alan Beban
    >>
    >>R D S wrote:
    >>
    >>>Yes sorry I relayed it incorrectly, the lookup goes between two sheets.
    >>>Thanks for the fix though.
    >>>
    >>>Rick
    >>>
    >>>"Dave Peterson" <[email protected]> wrote in message
    >>>news:[email protected]...
    >>>
    >>>
    >>>>=vlookup(left(a1,3),a1:b10,2,false)
    >>>>
    >>>>Although, your look up range (a1:b10) looks kind of strange to me.)
    >>>>
    >>>>Didn't you get a circular reference error when you tried this?
    >>>>(maybe A2:B10 or even sheet2!a1:b10???)
    >>>>
    >>>>
    >>>>
    >>>>R D S wrote:
    >>>>
    >>>>
    >>>>>When using the data in a cell as a reference for a vlookup how do I only
    >>>>>consider the first three characters in that cell.
    >>>>>
    >>>>>ie,
    >>>>>=VLOOKUP(A1,A1:B10,2,FALSE)
    >>>>>but I only want to consider the first three characters in A1
    >>>>>
    >>>>>Thanks,
    >>>>>Rick
    >>>>
    >>>>--
    >>>>
    >>>>Dave Peterson
    >>>
    >>>
    >>>

    >


  9. #9
    Dave Peterson
    Guest

    re: vlookup-When using the data in a cell as a reference for a vlookup

    Actually, I was thinking that your solution was better:

    abc1234 1
    bcd1353 2
    cde5135 3

    And the input field could be: abc3532 (but only the first 3 were important).

    (And sorry about confusing you with my "circular reference" reference <bg>.
    After I read your message, you may have heard that forehead slap!)


    Alan Beban wrote:
    >
    > My thought was that the table was laid out
    >
    > abc1 1
    > abc2 2
    > xyz27 3
    > abc3 4
    >
    > But on reflection *that* now seems to me kind of silly . . . I think.
    >
    > Oh well!
    >
    > Alan Beban
    >
    > Dave Peterson wrote:
    > > My puzzling comment was caused by a stupid error on my part (I put the formula
    > > in A1).
    > >
    > > But I read the OP's original question to ignore everything after the first three
    > > characters to mean that the table was laid out like:
    > >
    > > abc 1
    > > bcd 2
    > > cde 3
    > > def 4
    > >
    > > And the value in A1 looked like: abc-1234-asdf.
    > >
    > > ==
    > > On the other hand, maybe the OP tried both responses, liked yours better and
    > > just said thanks in one message.
    > >
    > > Alan Beban wrote:
    > >
    > >>Huh? And I thought Dave Peterson's comment was puzzling!
    > >>
    > >>Alan Beban
    > >>
    > >>R D S wrote:
    > >>
    > >>>Yes sorry I relayed it incorrectly, the lookup goes between two sheets.
    > >>>Thanks for the fix though.
    > >>>
    > >>>Rick
    > >>>
    > >>>"Dave Peterson" <[email protected]> wrote in message
    > >>>news:[email protected]...
    > >>>
    > >>>
    > >>>>=vlookup(left(a1,3),a1:b10,2,false)
    > >>>>
    > >>>>Although, your look up range (a1:b10) looks kind of strange to me.)
    > >>>>
    > >>>>Didn't you get a circular reference error when you tried this?
    > >>>>(maybe A2:B10 or even sheet2!a1:b10???)
    > >>>>
    > >>>>
    > >>>>
    > >>>>R D S wrote:
    > >>>>
    > >>>>
    > >>>>>When using the data in a cell as a reference for a vlookup how do I only
    > >>>>>consider the first three characters in that cell.
    > >>>>>
    > >>>>>ie,
    > >>>>>=VLOOKUP(A1,A1:B10,2,FALSE)
    > >>>>>but I only want to consider the first three characters in A1
    > >>>>>
    > >>>>>Thanks,
    > >>>>>Rick
    > >>>>
    > >>>>--
    > >>>>
    > >>>>Dave Peterson
    > >>>
    > >>>
    > >>>

    > >


    --

    Dave Peterson

  10. #10
    R D S
    Guest

    re: vlookup-When using the data in a cell as a reference for a vlookup

    The table is something like

    112a 1
    112b 1
    112c 1
    113a 2
    113b 2
    114a 3
    114b 3
    etc........
    Where the 1st three numbers are a shape and the letter is a colour.
    Since the shape is all that matters in this instance I would for obvious
    reasons prefer a list like
    112 1
    113 2
    114 3
    Hope that clears things up!
    Thanks for the help as ever,
    Rick

    "Dave Peterson" <[email protected]> wrote in message
    news:[email protected]...
    > Actually, I was thinking that your solution was better:
    >
    > abc1234 1
    > bcd1353 2
    > cde5135 3
    >
    > And the input field could be: abc3532 (but only the first 3 were

    important).
    >
    > (And sorry about confusing you with my "circular reference" reference

    <bg>.
    > After I read your message, you may have heard that forehead slap!)
    >
    >
    > Alan Beban wrote:
    > >
    > > My thought was that the table was laid out
    > >
    > > abc1 1
    > > abc2 2
    > > xyz27 3
    > > abc3 4
    > >
    > > But on reflection *that* now seems to me kind of silly . . . I think.
    > >
    > > Oh well!
    > >
    > > Alan Beban
    > >
    > > Dave Peterson wrote:
    > > > My puzzling comment was caused by a stupid error on my part (I put the

    formula
    > > > in A1).
    > > >
    > > > But I read the OP's original question to ignore everything after the

    first three
    > > > characters to mean that the table was laid out like:
    > > >
    > > > abc 1
    > > > bcd 2
    > > > cde 3
    > > > def 4
    > > >
    > > > And the value in A1 looked like: abc-1234-asdf.
    > > >
    > > > ==
    > > > On the other hand, maybe the OP tried both responses, liked yours

    better and
    > > > just said thanks in one message.
    > > >
    > > > Alan Beban wrote:
    > > >
    > > >>Huh? And I thought Dave Peterson's comment was puzzling!
    > > >>
    > > >>Alan Beban
    > > >>
    > > >>R D S wrote:
    > > >>
    > > >>>Yes sorry I relayed it incorrectly, the lookup goes between two

    sheets.
    > > >>>Thanks for the fix though.
    > > >>>
    > > >>>Rick
    > > >>>
    > > >>>"Dave Peterson" <[email protected]> wrote in message
    > > >>>news:[email protected]...
    > > >>>
    > > >>>
    > > >>>>=vlookup(left(a1,3),a1:b10,2,false)
    > > >>>>
    > > >>>>Although, your look up range (a1:b10) looks kind of strange to me.)
    > > >>>>
    > > >>>>Didn't you get a circular reference error when you tried this?
    > > >>>>(maybe A2:B10 or even sheet2!a1:b10???)
    > > >>>>
    > > >>>>
    > > >>>>
    > > >>>>R D S wrote:
    > > >>>>
    > > >>>>
    > > >>>>>When using the data in a cell as a reference for a vlookup how do I

    only
    > > >>>>>consider the first three characters in that cell.
    > > >>>>>
    > > >>>>>ie,
    > > >>>>>=VLOOKUP(A1,A1:B10,2,FALSE)
    > > >>>>>but I only want to consider the first three characters in A1
    > > >>>>>
    > > >>>>>Thanks,
    > > >>>>>Rick
    > > >>>>
    > > >>>>--
    > > >>>>
    > > >>>>Dave Peterson
    > > >>>
    > > >>>
    > > >>>
    > > >

    >
    > --
    >
    > Dave Peterson




  11. #11
    Dave Peterson
    Guest

    re: vlookup-When using the data in a cell as a reference for a vlookup

    Thanks for posting back.

    R D S wrote:
    >
    > The table is something like
    >
    > 112a 1
    > 112b 1
    > 112c 1
    > 113a 2
    > 113b 2
    > 114a 3
    > 114b 3
    > etc........
    > Where the 1st three numbers are a shape and the letter is a colour.
    > Since the shape is all that matters in this instance I would for obvious
    > reasons prefer a list like
    > 112 1
    > 113 2
    > 114 3
    > Hope that clears things up!
    > Thanks for the help as ever,
    > Rick
    >
    > "Dave Peterson" <[email protected]> wrote in message
    > news:[email protected]...
    > > Actually, I was thinking that your solution was better:
    > >
    > > abc1234 1
    > > bcd1353 2
    > > cde5135 3
    > >
    > > And the input field could be: abc3532 (but only the first 3 were

    > important).
    > >
    > > (And sorry about confusing you with my "circular reference" reference

    > <bg>.
    > > After I read your message, you may have heard that forehead slap!)
    > >
    > >
    > > Alan Beban wrote:
    > > >
    > > > My thought was that the table was laid out
    > > >
    > > > abc1 1
    > > > abc2 2
    > > > xyz27 3
    > > > abc3 4
    > > >
    > > > But on reflection *that* now seems to me kind of silly . . . I think.
    > > >
    > > > Oh well!
    > > >
    > > > Alan Beban
    > > >
    > > > Dave Peterson wrote:
    > > > > My puzzling comment was caused by a stupid error on my part (I put the

    > formula
    > > > > in A1).
    > > > >
    > > > > But I read the OP's original question to ignore everything after the

    > first three
    > > > > characters to mean that the table was laid out like:
    > > > >
    > > > > abc 1
    > > > > bcd 2
    > > > > cde 3
    > > > > def 4
    > > > >
    > > > > And the value in A1 looked like: abc-1234-asdf.
    > > > >
    > > > > ==
    > > > > On the other hand, maybe the OP tried both responses, liked yours

    > better and
    > > > > just said thanks in one message.
    > > > >
    > > > > Alan Beban wrote:
    > > > >
    > > > >>Huh? And I thought Dave Peterson's comment was puzzling!
    > > > >>
    > > > >>Alan Beban
    > > > >>
    > > > >>R D S wrote:
    > > > >>
    > > > >>>Yes sorry I relayed it incorrectly, the lookup goes between two

    > sheets.
    > > > >>>Thanks for the fix though.
    > > > >>>
    > > > >>>Rick
    > > > >>>
    > > > >>>"Dave Peterson" <[email protected]> wrote in message
    > > > >>>news:[email protected]...
    > > > >>>
    > > > >>>
    > > > >>>>=vlookup(left(a1,3),a1:b10,2,false)
    > > > >>>>
    > > > >>>>Although, your look up range (a1:b10) looks kind of strange to me.)
    > > > >>>>
    > > > >>>>Didn't you get a circular reference error when you tried this?
    > > > >>>>(maybe A2:B10 or even sheet2!a1:b10???)
    > > > >>>>
    > > > >>>>
    > > > >>>>
    > > > >>>>R D S wrote:
    > > > >>>>
    > > > >>>>
    > > > >>>>>When using the data in a cell as a reference for a vlookup how do I

    > only
    > > > >>>>>consider the first three characters in that cell.
    > > > >>>>>
    > > > >>>>>ie,
    > > > >>>>>=VLOOKUP(A1,A1:B10,2,FALSE)
    > > > >>>>>but I only want to consider the first three characters in A1
    > > > >>>>>
    > > > >>>>>Thanks,
    > > > >>>>>Rick
    > > > >>>>
    > > > >>>>--
    > > > >>>>
    > > > >>>>Dave Peterson
    > > > >>>
    > > > >>>
    > > > >>>
    > > > >

    > >
    > > --
    > >
    > > Dave Peterson


    --

    Dave Peterson

+ 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