Closed Thread
Results 1 to 6 of 6

Macro To Match Columns & If True Copy Row - How?

Hybrid View

  1. #1
    Registered User
    Join Date
    05-10-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    31

    Macro To Match Columns & If True Copy Row - How?

    Hi, I have a list with multiple unique numbers and then a list with a single corresponding unique number but next to the single entries are the surnames and forenames. I want to copy them over to the mulitple entry fields. For example:

    Enrol Ref No Surname First Forename
    0305526 0305526 ISMAIL AWRENG
    0305526 0503253 ZAHID SOHAIL
    0305526 0509352 HOLTEN THOMAS
    0305526 0608249 BROWN REBECCA
    0305526 0702933 BELLWOOD PAIGE
    0305526 0703808 CARROLL GEORGINA
    0305526 0704205 GARTERY JORDAN
    0374016 0708721 HAHAA KAREM SARAH QADER
    0374770 0708907 SHARIF KARWAN
    0503253 0708916 MOHAMMED TALAR
    0503253 0800413 BROOKS LEONA
    0503253 0800420 BEAUMONT MICHAEL
    0503253 0800501 CLAYTON JASMIN
    0503253 0802033 HALLSWORTH KRISTIAN


    A = Enrol
    B = Blank
    C = Blank
    D = Ref No
    E = Surname
    F = Forename

    I want A to match D and where it does match D I want it to copy the row for E and F next to it on to B and C. In other words in the example above (and attached) A2 to A8 matches D2, how do I then get it to copy E2 and F2 over to B2-B8 and C2-C8.

    How do I do that? I'll attach a small sample as the actual one runs in the thousands.

    A2-A15 and B2-B15 and C2-C15 should look like this:

    0305526 ISMAIL AWRENG
    0305526 ISMAIL AWRENG
    0305526 ISMAIL AWRENG
    0305526 ISMAIL AWRENG
    0305526 ISMAIL AWRENG
    0305526 ISMAIL AWRENG
    0305526 ISMAIL AWRENG
    0374016 No Match No Match
    0374770 No Match No Match
    0503253 ZAHID SOHAIL
    0503253 ZAHID SOHAIL
    0503253 ZAHID SOHAIL
    0503253 ZAHID SOHAIL
    0503253 ZAHID SOHAIL
    Attached Files Attached Files

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Macro To Match Columns & If True Copy Row - How?

    http://www.excelforum.com/excel-form...y-row-how.html
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro To Match Columns & If True Copy Row - How?

    This is indeed not only duplicate post, but Fortis has provided you the exact result as per your requirements.

  4. #4
    Registered User
    Join Date
    05-10-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Macro To Match Columns & If True Copy Row - How?

    How do I delete this thread?

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Macro To Match Columns & If True Copy Row - How?

    Don't worry for this..

    When(if) a Moderator will be online and if see our warnings, will close this thread.

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Macro To Match Columns & If True Copy Row - How?

    Thanks Fotis.

    Duplicate thread, hence closed.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed 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