+ Reply to Thread
Results 1 to 3 of 3

Copy and paste data from sheet 2 to sheet 1 based on specific criteria on sheet 1

  1. #1
    Registered User
    Join Date
    10-26-2012
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Copy and paste data from sheet 2 to sheet 1 based on specific criteria on sheet 1

    Hi Folks,

    I am very new to VBA code and am kinda lost.

    In the attached workbook 'Example' - I have been trying desperately to copy data from sheet 2 to sheet 1 based on the account number and the dates. So whereever the co-ordinates on sheet 1 in terms of 'account' in column 1 and dates in columns G to H match those on sheet 2 I need to copy the data in the corresponding cell and paste it to sheet 1. (I hope I am making some sense here!).

    Any assistance is welcome. I would not mind any formulas as well - if they work better than code. Thanks,

    vbadud.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Copy and paste data from sheet 2 to sheet 1 based on specific criteria on sheet 1

    Put this formula in Sheet1 G6 and copy down and across.

    =IFERROR(INDEX(Sheet2!$G$6:$Q$24, MATCH($A6,Sheet2!$A$6:$A$24,0), MATCH(G$5,Sheet2!$G$5:$Q$5,0)),"")

  3. #3
    Registered User
    Join Date
    10-26-2012
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Copy and paste data from sheet 2 to sheet 1 based on specific criteria on sheet 1

    Thanks a ton mate. That worked perfectly. cheers.

+ 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