Вы можете изменить и использовать ниже:
Sub test()
Dim rngDate As Range, rngLetter As Range
Dim dDate As Date
Dim LastRow As Long, LastColumn As Long, i As Long, y As Long
Dim Letter As String, strValue As String
With ThisWorkbook.Worksheets("Sheet1")
'Let as assume that Column A includes the letters. Find LastRow
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
'Let as assume that Row 1 includes the Dates. Find LastColumn
LastColumn = .Cells(1, .Columns.Count).End(xlToLeft).Column
'Test if there available Dates
If LastColumn > 1 Then
'Test if there available Letters
If LastRow > 1 Then
'Loop Dates
For i = 2 To LastColumn
'Set dDate
dDate = .Cells(1, i).Value
'Loop Letters
For y = 2 To LastRow
'Set Letter
Letter = .Cells(y, 1).Value
'Set Value to import
strValue = .Cells(y, i).Value
'Search in Sheet2
With ThisWorkbook.Worksheets("Sheet2")
'Let as assume that Row 1 includes the Dates
'Search for the dDate in Row 1
Set rngDate = .Rows(1).Find(What:=dDate, LookIn:=xlValues, lookat:=xlPart)
'Check if date found
If Not rngDate Is Nothing Then
'Search for the Letter in Column A
Set rngLetter = .Columns(1).Find(What:=Letter, LookIn:=xlValues, lookat:=xlPart)
If Not rngDate Is Nothing Then
'Import Value
.Cells(rngLetter.Row, rngDate.Column).Value = strValue
Else
MsgBox "Letter not found"
End If
Else
MsgBox "Date not found"
End If
End With
Next y
Next i
End If
End If
End With
End Sub