Forum Discussion

jan970's avatar
jan970
Copper Contributor
Oct 01, 2024

Vertical search of multiple variables has to return a different value depending column data found

Hello,

I'm doing a search to find the % that belongs to a team ( fe Anderlecht) coupled to a matchday (fe 1)

(table 1 => looking to fill cell N/B marked in yellow)

 

The data comes out of sheet 2 but If the team is found in column "Thuisploeg" then the percentage out of column 3 DEF % Thuis should be returned. IF the team is found in column "Uitploeg" then the percentage out of column 4 Def % UIT should be returned.

 

Any experts that can help me?

Kind regards,

Jan

 

 

 

 

  • jan970 

    It could be

    =XLOOKUP(A3, [Thuisploeg], [Def % Thuis], XLOOKUP(A3, [Utiploeg], [Def % UIT]) )
  • jan970 

    It could be

    =XLOOKUP(A3, [Thuisploeg], [Def % Thuis], XLOOKUP(A3, [Utiploeg], [Def % UIT]) )
    • jan970's avatar
      jan970
      Copper Contributor
      I get an error when entering
      =X.lookup(A3;Speeldagen!$B$2:$B$9;Speeldagen!$C$2:$C$9;X.lookup(A3;Speeldagen!$E$2:$E$9;Speeldagen!$F$2:$F$9;0;0;1);0;1)

Resources