Forum Discussion

0ff24's avatar
0ff24
Copper Contributor
Mar 06, 2025
Solved

Match data in grid from 3 variables

I'm having a hard time writing a formula to accomplish what I'm looking to accomplish.  I have a grid of data that is somewhat odd - it's how a company has been managing their process for a long time...
  • m_tarler's avatar
    Mar 06, 2025

    As with so much in excel there are many possibilities and depend on a few factors.  If we assume there will be 1 an only 1 possible combination of Variable 1, 2, and 3 then try something like:

    =CHOOSECOLS( XLOOKUP( in_var1 & "@" & in_var2, $A$2:$A$100 & "@" & $B$2:$B$100, $C$2:$H$100), XMATCH( in_var3, $C$1:$H$1) )

    if you just need to "search" then an alternative maybe to just turn FILTERS on and use them to filter by Var 1 and Var 2.  

    So highlight the whole table and go to DATA and click Filters (or click CTRL-SHIFT-L):

    Then you click the drop down arrows and enter in the search which values you want:

    In the example on the left I typed "name1" and notice the list drops out all the names from 2-9 and if you further select the specific "name" it will only show rows with that specific name.

    Then repeat on the second column.

Resources