+ Reply to Thread
Results 1 to 2 of 2

VBA for 2 worksheets, match name and paste

  1. #1
    Registered User
    Join Date
    08-04-2011
    Location
    CA, USA
    MS-Off Ver
    Excel 2003
    Posts
    1

    VBA for 2 worksheets, match name and paste

    Hey guys, looking for a VBA script. I have 2 worksheets. Worksheet B has 3 columns that I need to have in Worksheet A.
    I need to match up name and date columns between both worksheets, if there is a match, then I need to copy the columns from A to B. e.g.

    Worksheet A:
    Date: 1/1/11
    Name: Bob

    Worksheet B:
    Date: 1/1/11
    Name: Bob
    Column 1: A
    Column 2: B
    Column 3: C

    since there is a match for "Date" and "Name" between the 2 worksheets, then the rows of columns 1-3 is copied into Worksheet A.
    I hope that makes sense!

    I tried a search but wasn't sure what phrase to search for!
    Last edited by pheezy; 08-04-2011 at 07:41 PM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: VBA for 2 worksheets, match name and paste

    pheezy,

    Welcome to the forum. What you're asking for can be accomplished with formulas Index(), Match(), and/or Vlookup(), no VBA necessary. Attached is a sample workbook. See if that's what you're looking for.

    Hope that helps,
    ~tigeravatar
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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