ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   question on vlookup (https://www.excelbanter.com/excel-programming/335162-question-vlookup.html)

Demi

question on vlookup
 
I am setting up a Quality Check sheet for various suppliers.
The sheet contains various information related to various products.
Each product is made by different suppliers.
I want to use VLOOKUP to get data related to particular product.
I have sheets with details for each supplier.
I would like to know how can i change the range in each vlookup function so
that, once i select a particular supplier on my quality check sheet, for each
detail required on that page, the vlookup function selects the range for that
selected supplier automatically.
Meaning once i select the supplier the variuos vlookup on the main sheet
select the data only from the range of the selected supplier.
Is there anyother way to do it.
Please help


George Nicholson[_2_]

question on vlookup
 
Set up your Vlookup to use a range variable as the 2nd argument. When you
select a supplier, set that variable to the corresponding range. Then do
your lookup.

General outline:
******
Dim SupplierInfoRange as Range

Select Case SupplierSelection
Case "Supplier Able"
Set SupplierInfoRange = range_containing_SupplierAble_info
Case "Supplier Baker"
Set SupplierInfoRange = range_for_SupplierBaker
' ... yada, yada
End Select

MyResult = Vlookup(item_detail_to_look_for, SupplierInfoRange,
column_number_to_return, T_or_F)
**********
HTH,
--
George Nicholson

Remove 'Junk' from return address.


"Demi" wrote in message
...
I am setting up a Quality Check sheet for various suppliers.
The sheet contains various information related to various products.
Each product is made by different suppliers.
I want to use VLOOKUP to get data related to particular product.
I have sheets with details for each supplier.
I would like to know how can i change the range in each vlookup function
so
that, once i select a particular supplier on my quality check sheet, for
each
detail required on that page, the vlookup function selects the range for
that
selected supplier automatically.
Meaning once i select the supplier the variuos vlookup on the main sheet
select the data only from the range of the selected supplier.
Is there anyother way to do it.
Please help





All times are GMT +1. The time now is 03:38 AM.

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