Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2012
    Posts
    1

    Unanswered: Find Copy Paste Macro

    All,
    I am fairly new to Macros and VBA in Excel 2003 and needed some help writing a macro that can find a value in one worksheet then copy the value in a range of cells including the found cell to a third worksheet and then repeat the process. The value from the first worksheet shows up multiple times on the second worksheet. Can anyone point me in the right direction to some resources that can help me get started to figure this out? Thanks.

    The first worksheet is called "Returned Names" and the values that I need to search are in Col A and looks like this:

    Col A
    Name
    A Smith
    B Brainard
    W Scott

    The second called "CRM Names" is structured as follows:

    Col A Col B
    A Smith B Walo
    A Smith G Alex
    F Hye M Beck
    B Brainard B Walo
    J SMith R Flake
    B Brainard H Hank
    A Smith W. White

    In the second sheet I need to find all the instances of the names from the first sheet and then copy the adjacent cells in Col A, Col B, and Col C to the third sheet.

    The third sheet is named "Retained Names" and I am trying to have this sheet look as follows:

    A Smith B Walo
    A Smith G Alex
    A Smith W. White
    B Brainard B Walo
    B Brainard H Hank

    Thanks.
    Last edited by jonnyrebsc; 09-15-12 at 09:19.

  2. #2
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    995
    Provided Answers: 2
    Looks like you need to investigate the wonders of ActiveCell, and a couple of Do Until...Loops. I'm a bit swamped at the moment (we're upgrading from Office 2000 to Office 2010 in one hit), but I'll try to knock something together later.
    10% of magic is knowing something that no-one else does. The rest is misdirection.

  3. #3
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    995
    Provided Answers: 2
    Try this - it's Excel 2000, but should work for you.
    Attached Files Attached Files
    10% of magic is knowing something that no-one else does. The rest is misdirection.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •