+ Reply to Thread
Results 1 to 7 of 7

VLOOKUP formula help

  1. #1
    Registered User
    Join Date
    11-13-2006
    Posts
    3

    VLOOKUP formula help

    Hi all,

    Any help with the following problem of mine would be a great help

    I have three rows of numbers:

    82630384
    82630399
    82630550
    82630550
    82630551 - Row A

    82630384
    82630399
    82630550
    82630551
    82630585 - Row B

    95046769
    95046741
    95046305
    95046788
    95046373 - Row C

    What I would like to be able to do is - for each entry in row A, find it in row B and then return it's matching value in row C.

    e.g. take the number 82630551 which is the fifth entry in row A & the fourth entry in row B. I would like my formula to match this as the fourth entry in row B and return the corresponding fourth value from row C i.e. 95046788

    Any ideas would be much appreciated!

  2. #2
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581
    Actually, you probably want HLOOKUP if your data is presented in rows like you indicated.

    Try:

    = HLOOKUP(A1,$B$1:$C$5,2,FALSE)

    Scott

  3. #3
    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
    Hi,

    I would try this and drag down

    =INDEX($C$1:$C$5,MATCH(A1,$B$1:$B$5,0))


    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  4. #4
    Registered User
    Join Date
    11-13-2006
    Posts
    3
    Sorry guys, the data I have is three columns not three rows as indicated in my original post...

    I can match up each entry in column A with it's match in column B ok, the problem is getting the function to return the corresponding entry from column C - i.e. if 5th entry in A is found as fourth entry in B then return fourth entry from C

  5. #5
    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
    Hi,

    My example did use three columns. See attached example

    http://www.savefile.com/files/253251

    VBA Noob

  6. #6
    Registered User
    Join Date
    11-13-2006
    Posts
    3
    Excellent... thanks VBA Noob

    Just one thing do the columns have to be text or nums in order for the statement to work or can it be applied to any kind of column formatting?

    And cheers once again!

  7. #7
    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
    Hi,

    Depends on the formatting.

    If you format A to C as Text it still works. If you enter a number as '82630551 and then delete the ' it won;t work.

    Best to have all numbers stored as text converted to numbers

    VBA Noob

+ 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