This macro works. Thank you for your previous help
My worksheet starts out with 1000+ rows at start of month, and the For/Next loop takes a while to run through the sheet. Is there a way to speed it up?
Sub SiteNum()
Dim LastRow As Long
Dim x As Long
Dim y As Long
LastRow = Cells(Rows.Count, 3).End(xlUp).Row
For y = 2 To LastRow
Range("H" & y) = "=Index(" & Range("$P$2:$P$284").Address(False, False) & " , Match(" & Range("E" & y).Address(True, False) & " ," & Range("$O$2:$O$284").Address(True, True) & ", 0))"
Next y
End Sub
My worksheet starts out with 1000+ rows at start of month, and the For/Next loop takes a while to run through the sheet. Is there a way to speed it up?
Sub SiteNum()
Dim LastRow As Long
Dim x As Long
Dim y As Long
LastRow = Cells(Rows.Count, 3).End(xlUp).Row
For y = 2 To LastRow
Range("H" & y) = "=Index(" & Range("$P$2:$P$284").Address(False, False) & " , Match(" & Range("E" & y).Address(True, False) & " ," & Range("$O$2:$O$284").Address(True, True) & ", 0))"
Next y
End Sub