I have this code, which inserts "Department 75" in a cell if criteria is met but the problem is that the macro is applied to all lines that meet the criteria which is if rows contain "Source Total" insert row another row and insert value "Department 75". Is there a way that this macro only applies to just the one/first line that meets criteria.
Code:
For n = nlast To 1 Step -1 If Sht.Cells(n, "C").Value = "Source Total==>" Then
Sht.Cells(n, "A").EntireRow.Offset(1).Insert
Sht.Cells(n, "A").Offset(1).Value = "Department 75"
End If
Next n