Sub CleaningData()
Dim targetName As Range
For Each targetName In Range("A2:A147")
Sheets("Customers").Range("D3").Value = targetName.Value
If Range("D4") = 0 Then
Range("j1").Formula = "=counta(F:F)"
Dim r As Integer
r = Range("J1").Value + 1
Range("F" & r).Value = targetName.Value
Range("G" & r).Value = targetName.Address
End If
Next targetName
End Sub
Dim targetName As Range
For Each targetName In Range("A2:A147")
Sheets("Customers").Range("D3").Value = targetName.Value
If Range("D4") = 0 Then
Range("j1").Formula = "=counta(F:F)"
Dim r As Integer
r = Range("J1").Value + 1
Range("F" & r).Value = targetName.Value
Range("G" & r).Value = targetName.Address
End If
Next targetName
End Sub
No comments:
Post a Comment