Hi there,

I'm trying to code a macro to copy a range of values on Sheet 1 (E11:E21) and find a location to paste them to on DataD based on two criteria; 1. the date on Sheet 1 (H3) and the name on Sheet 1 (C5). It will first have to search row 2 of Data D for a matching name, then search column 1 of Data D for the matching date (in this case Aug-10).

I got this so far which does the first part and pastes at a fixed offset but now I'm stumped:


Sub StatsTrans()


Application.ScreenUpdating = False

msg1 = MsgBox("Current crash blood stats will be transfered to InputA. Are You Sure?", vbYesNo)
If msg1 = vbNo Then Exit Sub

Dim FoundName As Range
Set FoundName = Worksheets("DataD").Rows("2").Find(Worksheets("Sheet1").Range("C5").Value, LookIn:=xlValues, LookAt:=xlWhole)

If Not FoundName Is Nothing Then
Worksheets("Sheet1").Range("E11,E13,E14,E16,E17,E19,E21").Copy
FoundName.Offset(0, 1).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=True, Transpose:=True

End If
Range("A1").Select
Application.CutCopyMode = False

MsgBox "The data has been successfully copied."

Application.ScreenUpdating = True
End Sub


Output Workbook.xlsAny help!?

Cheers