Home

Power Query Vlookup Dynamic Column Reference

Nathan88
Occasional Visitor

I have a query where Column "INDEX" values are the header names of other columns. I want to return the matching value. How can i do this in Power Query? Its basically a Vlookup with a dynamic col_index_num. I cannot seem to find a solution.. Thank you for the help!

 

 

2 Replies

I'm moving your question to the Excel community for better visibility.

In query on second table select KEY column, Unpivot other columns and add column with combined index. In query on first table create same combined index (KEY & "any text/symbol which is definitely not in your names" & INDEX), merge on it with second table and expand values only.

 

Please check attached.

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies