Results 1 to 5 of 5

Thread: Macro to match cell value from two sheets and paste where the value is met

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2012
    Posts
    3

    Question Macro to match cell value from two sheets and paste where the value is met

    I'm new to VBA, I'm using Microsoft Office Excel 2007 and I read the forums but this seems impossible for me. I have the current code which copies a sheet and adds a day to the date and also copies a range of cells containing the important information from the sheet to be able to paste it in a calendar with realtime information and I need it to paste where the date is the same and one cell below the value which could be located in any place in a certain range.
    Code:
    Sub CopierPetete()
     ActiveWorkbook.ActiveSheet.Copy _
            After:=ActiveSheet
        'update date
            [J1].Value = [J1].Value + 1
    
       'THIS IS MY POOR ATTEMPT TO MAKE IT WORK
        If Sheets("Sheet5").Range("A1:K100").Value = ActiveSheet.Range("J1").Value Then _  
    
            ActiveSheet.Range("AA100:AC121").Select
                Selection.Copy
            Sheets("Sheet5").Select
                Sheets("Sheet5").Pictures.Paste Link:=True
    
        End If
    
    End Sub
    I need it to match the value in the activesheet cell "J1" with any cell on "Sheet5", and paste "ActiveSheet.Range("AA100:AC121")" as a picture link (Or if you have a better idea for a way to display real-time information) at the place where the value is met between ActiveSheet "J1" and any cell between the range "A1:K100" on "Sheet5", one cell below. PLEASE help me, I posted this on other forums and no one was able to help me with it.

    Here is a link to the project http://www.mediafire.com/?olsvdd22dxmslrz
    Thank you!
    Last edited by Gevelegian; Feb 3rd, 2012 at 03:41 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width