SOLVED

Fetching multiple match values and display in drop down using VBA

%3CLINGO-SUB%20id%3D%22lingo-sub-2444170%22%20slang%3D%22en-US%22%3EFetching%20multiple%20match%20values%20and%20display%20in%20drop%20down%20using%20VBA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2444170%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20new%20to%20VBA%2C%20Please%20help%20me%20on%20below.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20three%20sheets%20in%20my%20Excel%20(%20Template%2C%20Vendor%20ID%2C%20Vendor%20Location).%3C%2FP%3E%3CP%3ETemplate%20sheet%20have%20the%20three%20columns%20(%20Vendor%20ID%2C%20Vendor%20Name%2C%20Location%20).%3CBR%20%2F%3EVendor%20ID%20sheet%20have%20two%20columns%20(%20Vendor%20ID%2C%20Vendor%20Name).%3CBR%20%2F%3EVendor%20Location%20have%20the%20two%20columns%20(%20Vendor%20ID%20%2C%20Location%20).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1.%20in%20Template%20sheet%20i%20need%20to%20display%20the%20unique%20Vendor%20ID's%20as%20searchable%20dropdown%20in%20Vendor%20id%20Column%20(%20Entire%20column%20should%20be%20as%20searchable%20drop%20down).%3CBR%20%2F%3E2.%20When%20we%20select%20the%20Vendor%20id%20in%20Template%20Vendor%20ID%20column%2C%20need%20to%20to%20display%20the%20corresponding%20vendor%20Name%20in%20vendor%20Name%20column%20drop%20down.%3CBR%20%2F%3E3.need%20to%20display%20the%20Corresponding%20vendor%20locations%20in%20the%20Vendor%20locations%20drop%20down.%20(%20One%20vendor%20ID%20may%20contain%20multiple%20locations%20).%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2444170%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2444383%22%20slang%3D%22en-US%22%3ERe%3A%20Fetching%20multiple%20match%20values%20and%20display%20in%20drop%20down%20using%20VBA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2444383%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1078156%22%20target%3D%22_blank%22%3E%40Muneendra%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENo%20VBA%20needed.%20See%20the%20attached%20version.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2444419%22%20slang%3D%22en-US%22%3ERe%3A%20Fetching%20multiple%20match%20values%20and%20display%20in%20drop%20down%20using%20VBA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2444419%22%20slang%3D%22en-US%22%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F127945%22%20target%3D%22_blank%22%3E%40Hans%20Vogelaar%3C%2FA%3E%2C%3CBR%20%2F%3ECan%20you%20please%20let%20me%20know%20the%20steps%20you%20have%20performed%20to%20achieve%20this.%3CBR%20%2F%3EIt%20will%20be%20great%20help%2C%20if%20we%20achieve%20same%20without%20using%20the%20table%20format%20in%20Template%20Sheet.%20(%20It%20may%20include%20several%20other%20columns).%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%2C%3CBR%20%2F%3EMuneendra.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2444477%22%20slang%3D%22en-US%22%3ERe%3A%20Fetching%20multiple%20match%20values%20and%20display%20in%20drop%20down%20using%20VBA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2444477%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1078156%22%20target%3D%22_blank%22%3E%40Muneendra%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20created%20a%20few%20named%20ranges%20-%20see%20Formulas%20%26gt%3BName%20Manager.%3C%2FP%3E%0A%3CP%3EI%20used%20these%20names%20in%20Data%20Validation%20rules%20for%20column%20A%20and%20C.%3C%2FP%3E%0A%3CP%3EIt%20is%20not%20essential%20that%20the%20data%20on%20the%20Template%20sheet%20are%20in%20table%20format.%20See%20the%20attached%20version.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi All,

 

I am new to VBA, Please help me on below.

 

I have three sheets in my Excel ( Template, Vendor ID, Vendor Location).

Template sheet have the three columns ( Vendor ID, Vendor Name, Location ).
Vendor ID sheet have two columns ( Vendor ID, Vendor Name).
Vendor Location have the two columns ( Vendor ID , Location ).

 

1. in Template sheet i need to display the unique Vendor ID's as searchable dropdown in Vendor id Column ( Entire column should be as searchable drop down).
2. When we select the Vendor id in Template Vendor ID column, need to to display the corresponding vendor Name in vendor Name column drop down.
3.need to display the Corresponding vendor locations in the Vendor locations drop down. ( One vendor ID may contain multiple locations ).

5 Replies

@Muneendra 

No VBA needed. See the attached version.

@Hans Vogelaar,
Can you please let me know the steps you have performed to achieve this.
It will be great help, if we achieve same without using the table format in Template Sheet. ( It may include several other columns).

Thanks,
Muneendra.
best response confirmed by allyreckerman (Microsoft)
Solution

@Muneendra 

I created a few named ranges - see Formulas >Name Manager.

I used these names in Data Validation rules for column A and C.

It is not essential that the data on the Template sheet are in table format. See the attached version.

Hi @Hans Vogelaar,

Thanks alot for your kind help. My excel may hold more than 10K rows, will it perform faster?

@Muneendra 

Excel should be able to handle that, but you'll have to try it yourself.