J
JMay
I've been trying to debug the below code for better than 3 hours, without
success.
Can someone help me?
Sub NewMatchStuff()
Set SRng = Worksheets("TheHdr").Range("D3", Range("D" & Rows.Count).End(xlUp))
Set DRng = Worksheets("Hdr formula").Range("A1:T1")
i = 1
With DRng
Do
Set g = .Find(SRng(i))
If Not g Is Nothing Then
faddress = g.Address
g.Offset(1).Value = SRng(i).Offset(0, -2).Value
End If
i = i + 1
Loop Until Not g Is Nothing
Do
Set g = Nothing 'Need to reset g to Nothing
Set g = .FindNext(SRng(i)) '*** R/T 1004 Here
i = i + 1
Loop While Not g Is Nothing And g.Address <> faddress
End With
End Sub
success.
Can someone help me?
Sub NewMatchStuff()
Set SRng = Worksheets("TheHdr").Range("D3", Range("D" & Rows.Count).End(xlUp))
Set DRng = Worksheets("Hdr formula").Range("A1:T1")
i = 1
With DRng
Do
Set g = .Find(SRng(i))
If Not g Is Nothing Then
faddress = g.Address
g.Offset(1).Value = SRng(i).Offset(0, -2).Value
End If
i = i + 1
Loop Until Not g Is Nothing
Do
Set g = Nothing 'Need to reset g to Nothing
Set g = .FindNext(SRng(i)) '*** R/T 1004 Here
i = i + 1
Loop While Not g Is Nothing And g.Address <> faddress
End With
End Sub