I have to search a specific Heading (row 51) and then copy the first cell under the heading to a different cell (B10) on the same sheet. All the data under that heading are the same date. I've tried to code it but it says 'Object variable or With block variable not set'.
Dim rngDateHeader As Range
Dim rngHeaders As Range
Set wb1 = Application.ActiveWorkbook
Set ws1 = wb1.Sheets("Summary")
Set rngDateHeader = ws1.Rows(51).Find("SDC Date", , xlValues, xlWhole)
If Not rngDateHeader Is Nothing Then
rngDateHeader.Offset(1, 0).Copy
ws1.Range("B10") = rnbDateHeader
End If
Bookmarks