Lookup Macro
Basically,
I am trying to incorporate this into the macro
The range should equal this LOOKUP(LEFT(D5,3),HTC!A2:A200,HTC!B2:B200)
"Dthmtlgod" wrote in message
...
I have the following piece of code. It looks to see if a cell is zero
If Range("Sheet1!J" & I).Value = 0 Then
**** This is where I need assistance. If it is zero, then I need to do a
lookup on the value of
left(range("Sheet1!A" & i), 3) in another worksheet (Sheet2, column B).
It
is trying to find a match on the first three digits of column A to Sheet2,
column A, and return the lookup value of B to column Sheet1!J.
range("Sheet1!j" & I).value =
*****
End If
I have been trying to get this to work for a couple of hours now, any
assistance is much appreciated.
|