Thank you JLG and Eliano,
Here is the amended macro I used to enter a "comment" (it enters a value to
the cell rather than in a comment box adjacent) as text in each cell of my
Report where each cell in column A contains a value that appeared in my
SourceDoc(Sheet1). I Hope this makes sense.
Ideally it checks column B of the SourceDoc against column A of the Report
and if a matching entry is found, it enters the date in Column A of the
report, on the same row as the check value.
Sub CheckData()
Dim c As Range
Dim findC As Variant
With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
End With
Windows("Report.xls").Activate '<-- My report
For Each c In ActiveSheet.Range("A2:A90")
If Not c Is Nothing Then
Windows("SourceDoc.xls").Activate '<-- My document to be checked
Set findC = Worksheets("Sheet1").Cells _
.Find(c.Value, LookIn:=xlValues)
If Not findC Is Nothing Then
Windows("Report.xls").Activate
ActiveSheet.Range("I" & c.Row).Cells.Value = "20/02/2008"
End If
End If
Next
With Application
.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
End With
End Sub
Kind Regards
Dylan Dawson