Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have created the following generic function which use Excel Vlookup function to find the exact match. It works fine however I am trying to create another function similar to this but which would return multple matches in an array e.g if their are dupliacets get all exact matches of the part # with corsponding values. Is it possible & how. Function SearchSku(Pno As String, WB As String, Sheet As String, SCol As Long, GetCol As Long) Res = "" Dim wks As Worksheet Set wks = Workbooks(WB).Sheets(Sheet) Set r = wks.Range(wks.Cells(1, SCol), wks.Range ("IV60000")) Res = Application.VLookup(Pno, r, GetCol, False) If IsError(Res) Then SearchSku = "" Else SearchSku = Res End If End Function Thanks a million James B. Xl2K vba |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Lookup across multiple columns within multiple sheets | Excel Discussion (Misc queries) | |||
Multiple lookup values and adding multiple rates across together | Excel Worksheet Functions | |||
Lookup using multiple sheets and multiple criteria, sorry if 2 pos | Excel Worksheet Functions | |||
Lookup using multiple sheets and multiple criteria | Excel Discussion (Misc queries) | |||
Lookup in Multiple Columns, Return Multiple Values | Excel Worksheet Functions |