Forum Discussion

BazzaP87's avatar
BazzaP87
Copper Contributor
Jun 17, 2025

Filter formula for looking up data in a table

Hi, I,m looking for a formula that can lookup and return results when I select the name and return the vehicles at the top 
eg - Andy  Scooter Bicycle Car Bus

Thanks for any help

 ScooterBicycleMotorbikeCarBusLorryHGV

Andy

xx xx  
Brianx x  xx
Carl xxxx x
Davexxx    

2 Replies

  • Harun24HR's avatar
    Harun24HR
    Bronze Contributor

    Same as previous question answer.

    =TEXTJOIN(", ",1,FILTER(B1:J1,FILTER(B2:J6,A2:A6=O1)="x"))
    =BYROW(A2:J6,LAMBDA(r,TEXTJOIN(", ",1,TAKE(r,,1),FILTER(B1:J1,DROP(r,,1)="x"))))

     

  • =LET(arr,LAMBDA(x,CHOOSE(x,A2:A5,SEQUENCE(ROWS(B2:H5)))),
    MAP(arr({1}),arr({2}),LAMBDA(a,b,TEXTJOIN(" ",,a,FILTER(B1:H1,CHOOSEROWS(B2:H5,b)="x")))))

    This should work if i correctly understand what you are looking for.

Resources

OSZAR »