J
JenIT
The below formula works as written for a set value of "66-1007" in column B.. My problem is I need to search for a portion of that value as the 66-10 will remain constant, but the last 2 numbers might change (it is always a 7character field). I have tried the * and # variables and have not had luck. Any help would be appreciated.
With Sheets("myworkshet")
Set rngToSearch = .Range(.Range("B2"), _
.Cells(Rows.Count, "B").End(xlUp))
End With
For Each rng In rngToSearch
With rng
If .Value = "66-1007" Then
Cells(.Row, "K").FormulaR1C1 = "=(RC[6]+RC[7])*0.08615"
End If
End With
Next rng
With Sheets("myworkshet")
Set rngToSearch = .Range(.Range("B2"), _
.Cells(Rows.Count, "B").End(xlUp))
End With
For Each rng In rngToSearch
With rng
If .Value = "66-1007" Then
Cells(.Row, "K").FormulaR1C1 = "=(RC[6]+RC[7])*0.08615"
End If
End With
Next rng