VBA Alternative to Vlookup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top