Q
QuietMan
Does anyone know a more efficient way to write this code...as I will be
checking 50k+ rows
Sub Tester()
X = 2
Do While X < 9
Dept_Checker = Cells(X, 1)
CoversDept = Range("CoversDept")
For Each Dept In CoversDept
If Dept_Checker = Dept Then Active_Department = Dept_Checker
Next
Cells(X, 17) = Active_Department
X = X + 1
Loop
End Sub
checking 50k+ rows
Sub Tester()
X = 2
Do While X < 9
Dept_Checker = Cells(X, 1)
CoversDept = Range("CoversDept")
For Each Dept In CoversDept
If Dept_Checker = Dept Then Active_Department = Dept_Checker
Next
Cells(X, 17) = Active_Department
X = X + 1
Loop
End Sub