ryan_law2000
Well-known Member
- Joined
- Oct 2, 2007
- Messages
- 738
everyone, I have VBA that works great except when a change is made in column G it runs the vlookup formula on all the rows in column H.
Any way to modify this so it only runs the vlookup on the updated row? and not the entire column?
thanks in advance...
Any way to modify this so it only runs the vlookup on the updated row? and not the entire column?
thanks in advance...
Code:
If Not Intersect(Target, Sheet4.Range("G9:G1000")) Is Nothing Then
Dim lRowCount As Long
lRowCount = Cells(Rows.Count, "G").End(xlUp).Row
With Range("H9").Resize(lRowCount)
.Formula = "=IFERROR(VLOOKUP([@[Unit '#]],Table_owssvr_1[[#All],[Assigned Unit '#]:[Removal Date]],3),"""")": .Value = .Value
End With
End If