SOLVED
Home

Excel VLOOKUP with Named Ranges

%3CLINGO-SUB%20id%3D%22lingo-sub-457879%22%20slang%3D%22en-US%22%3EExcel%20VLOOKUP%20with%20Named%20Ranges%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-457879%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20is%20my%20formula%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DVLOOKUP(%3CSPAN%3EA1%3C%2FSPAN%3E%2CGroup1%2C3%2CFALSE)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20I%20write%20it%20out%20like%20this%20it%20works%20prefectly.%20But%20I%20want%20a%20dropdown%20from%20another%20cell%20where%20I%20can%20choose%20a%20group%20(Group1%2C%20Group2%2C%20Group3%20etc)%20and%20then%20the%20VLOOKUP%20function%20will%20have%20whatever%20group%20was%20selected%20from%20the%20dropdown.%20These%20groups%20are%20named%20ranges%20that%20cover%20multiple%20rows%20and%20columns.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20tried%20creating%20a%20list%20using%20data%20validation%20but%20it%20seems%20to%20have%20an%20issue%20that%20there%20are%20multiple%20rows%2Fcolumns.%20Any%20help%20would%20be%20appreciated.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-457879%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-457966%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20VLOOKUP%20with%20Named%20Ranges%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-457966%22%20slang%3D%22en-US%22%3EYou%20can%20include%20CHOOSE%20in%20your%20VLOOKUP%20formula%20this%20way%3A%3CBR%20%2F%3E%3DVLOOKUP(A1%2C%3CBR%20%2F%3ECHOOSE(MATCH(B1%2C%7BGroup1%2CGroup2%2CGroup3%7D%2C1)%2C%3CBR%20%2F%3EGroup1%2CGroup2%2CGroup3)%2C%3CBR%20%2F%3E3%2C0)%3CBR%20%2F%3EThe%20foregoing%20formula%20is%20non-volatile.%20An%20alternative%20would%20be%20the%20volatile%20INDIRECT%2C%20as%20follows%3A%3CBR%20%2F%3E%3DVLOOKUP(A1%2C%3CBR%20%2F%3EINDIRECT(B1)%2C%3CBR%20%2F%3E3%2C0)%3CBR%20%2F%3EThe%20choice%20is%20yours.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-460342%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20VLOOKUP%20with%20Named%20Ranges%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-460342%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F280482%22%20target%3D%22_blank%22%3E%40Twifoo%3C%2FA%3E%26nbsp%3BI'm%20getting%20an%20error%20with%20this.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20think%20what%20I'm%20trying%20to%20accomplish%20is%20actually%20outside%20of%20the%20VLOOKUP%20function.%20In%20a%20separate%20cell%20I%20would%20like%20to%20have%20a%20dropdown%20selection%20of%20various%20Named%20Ranges%20(which%20are%20named%20Group%2C1%20%2C%20Group%202%20etc)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20VLOOKUP%20function%26nbsp%3BI%20would%20just%20like%20to%20have%20the%20second%20parameter%20reference%20the%20value%20of%20the%20dropdown%20cell%20selection.%20So%20I%20imagine%20it%20would%20look%20something%20like%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DVLOOKUP(%3CSPAN%3EA3%3C%2FSPAN%3E%2C%3CSPAN%3EA2%3C%2FSPAN%3E%2CFALSE)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhere%2C%20in%20this%20case%2C%20A2%20is%20simply%20a%20dropdown%20selection%20of%20a%20named%20range.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Nate_04
Occasional Visitor

This is my formula:

 

=VLOOKUP(A1,Group1,3,FALSE)

 

If I write it out like this it works prefectly. But I want a dropdown from another cell where I can choose a group (Group1, Group2, Group3 etc) and then the VLOOKUP function will have whatever group was selected from the dropdown. These groups are named ranges that cover multiple rows and columns.

 

I've tried creating a list using data validation but it seems to have an issue that there are multiple rows/columns. Any help would be appreciated.

 

 

1 Reply
Solution
You can include CHOOSE in your VLOOKUP formula this way:
=VLOOKUP(A1,
CHOOSE(MATCH(B1,{Group1,Group2,Group3},1),
Group1,Group2,Group3),
3,0)
The foregoing formula is non-volatile. An alternative would be the volatile INDIRECT, as follows:
=VLOOKUP(A1,
INDIRECT(B1),
3,0)
The choice is yours.