ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA Alternative to Vlookup (https://www.excelbanter.com/excel-programming/303413-vba-alternative-vlookup.html)

Stan

VBA Alternative to Vlookup
 
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


Masked Coder[_4_]

VBA Alternative to Vlookup
 
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

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 08:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com