+ Reply to Thread
Results 1 to 3 of 3

Compare two columns A & C and copy B values to D for common ones

Hybrid View

  1. #1
    Registered User
    Join Date
    11-14-2011
    Location
    Banglore, India
    MS-Off Ver
    Excel 2003
    Posts
    2

    Post Compare two columns A & C and copy B values to D for common ones

    Hi Team,

    I am a novice in excel and am trying to learn the ropes, however I need some help with the following situation.

    I have 4 columns A, B, C & D. Now I need to compare A & C and for values common to A & C, I need copy their corresponding values in column B to D. Something as below where 4,6, 7, 8 & 9 are common to A & C and the values corresponding to these in B are populated in column D as well.

    Roll nos. subject Roll nos. subject
    1 Physics 4 biology
    2 english 6 Math
    3 chemistry 7 geography
    4 biology 8 history
    5 Computers 9 civics
    6 Math 23
    7 geography 34
    8 history 35
    9 civics 36
    10 economincs 37



    Please help me understand the logic as well so that I can refer to it and develop my own functions in future. Thanks in advance. PFA the same example in excel.

    regards,

    Pawan
    Attached Files Attached Files
    Last edited by NBVC; 11-23-2011 at 09:09 AM. Reason: editing example and also attaching a file

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Compare two columns A & C and copy B values to D for common ones

    I think in D2:

    =VLOOKUP(C2,$A$2:$B$11,2,0)

    copied down
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    11-14-2011
    Location
    Banglore, India
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Compare two columns A & C and copy B values to D for common ones

    Hi Friend,

    Thanks! a ton. That did the job. Sorry about the delayed reply.

    Best regards,

    Pawan

+ 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