+ Reply to Thread
Results 1 to 6 of 6

How to copy a column when two others match

  1. #1
    Registered User
    Join Date
    06-30-2009
    Location
    Canton, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    3

    How to copy a column when two others match

    Hello,

    I have three columns of numeric data, I'll refer to them as A, B, and C. Here is what I want to do.

    I want excel to search for whenever a value in row x of column "A" matches a value in row y of column "B", then I want it to copy the data from row y in column "C" to row x in column "D".

    I hope that is clear. I am pretty sure I will need a macro to do this, but I have very little experience with excel, so I am unsure. Any ideas on how to do this? Thanks!

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to copy a column when two others match

    I am pretty sure I will need a macro to do this...
    Quite possibly but we would need a far more accurate outline of the issue to be able to determine that one way or another.

    For ex it may be you can use:

    Dx: =INDEX(C:C,MATCH(Ax,B:B,0))

    A sample file (with expected results) will surely help us visualise exactly what it is you want to do.

  3. #3
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: How to copy a column when two others match

    A formula is probably possible, but using code perhaps like this?
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-30-2009
    Location
    Canton, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: How to copy a column when two others match

    Hopefully this will get the idea across.
    Attached Files Attached Files

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to copy a column when two others match

    Extending earlier formula based example:

    G1: =IF(COUNTIF(B:B,F1),INDEX(C:C,MATCH(A1,B:B,0)),"")
    copied down

  6. #6
    Registered User
    Join Date
    06-30-2009
    Location
    Canton, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: How to copy a column when two others match

    DonkeyOte,

    That did it. Thank you very much for your help.

+ 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