Here is how you can do it the vba way -
Option Explicit
Sub copy_data()
Dim lrow As Long, i As Long, j As Long, lastrow As Long
With Worksheets("RawData")
lrow = .Range("B" & .Rows.Count).End(xlUp).Row
lastrow = Worksheets("FormattedData").Range("B" & Rows.Count).End(xlUp).Row
For i = 3 To lrow
For j = 3 To lastrow
If Day(.Cells(i, 2)) = Worksheets("FormattedData").Cells(j, 2) Then
Worksheets("FormattedData").Cells(j, 3).Value = .Cells(i, 3).Value
Exit For
End If
Next j
Next i
End With
End Sub
Copy the Excel VBA code
Select the workbook in which you want to store the Excel VBA code
Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
Choose Insert | Module
Where the cursor is flashing, choose Edit | Paste
To run the Excel VBA code:
Choose Tools | Macro | Macros
Select a macro in the list, and click the Run button
Bookmarks