VBA Alternative to Vlookup

S

Stan

Hi All,

I am looking for an alternative to the Vlookup function by some coding in VBA.

I know how to use the vlookup function without any hassle at all - including in this case, but I really would like to have it coded, to prevent unauthorised modifying etc.

All I'm after is checking a part number that a user will input into a cell, then on the click of a button will check that part number against a list and then in another cell indicate whether the chacked part is hazardous or not.

Any help would be greatly appreciated.

Stan
 
M

Masked Coder

Use search to get the correct value:

Dim Rnge As Range
Dim Hazard As String

Rnge = Worksheets(NAME).Range.Find(SEARCHVALUE, LookIn:=xlValues
LookAt:=xlWhole)

Hazard = Range(Rnge).Offset(y, x).Valu
 
Top