tourless
Board Regular
- Joined
- Feb 8, 2007
- Messages
- 144
- Office Version
- 365
- Platform
- Windows
Hi Folks.
If I enter my vlookup... =VLOOKUP(O7,BudgetHours,2,FALSE)*U1 directly into a cell it works as expected. When I try to pass this... Range("D" & i).Formula = "=VLOOKUP(O & i & ,BudgetHours,2,False)*U1" I get thrown out of my routine. Here's the full snippet...
If I enter my vlookup... =VLOOKUP(O7,BudgetHours,2,FALSE)*U1 directly into a cell it works as expected. When I try to pass this... Range("D" & i).Formula = "=VLOOKUP(O & i & ,BudgetHours,2,False)*U1" I get thrown out of my routine. Here's the full snippet...
VBA Code:
lRow = Range("A" & Rows.Count).End(xlUp).Row
For i = 3 To lRow
With Range("O" & i)
If .Font.Bold Then
Range("D" & i).Formula = "=VLOOKUP(O & i & ,BudgetHours,2,False)*U1"
End If
End With
Next