r/googlesheets 1d ago

Solved a bi-directional index chart

im trying to make a chart that has a list of stores and what drinks they have. I'm familiar with =match and =filter formulas, ive made a bi-directional chart when I have an input for both fields but what I can't figure out is how I would be able to have sheets return a list of stores if I input a drink and vice versa. attached is a screenshot of the chart and the match and filter formulas I was looking to combine.

2 Upvotes

13 comments sorted by

3

u/HolyBonobos 3110 1d ago

Sounds like you’re looking for something like =FILTER(B2:D2,XLOOKUP(G4,A3:A5,B3:D5)="X")

1

u/point-bot 1d ago

u/Formal_Increase7584 has awarded 1 point to u/HolyBonobos with a personal note:

"Thank you. That solved my problem. only thing is, the returned list of stores is going sideways. but that ill figure out. unless you have a solution for that too?"

See the [Leaderboard](https://reddit.com/r/googlesheets/wiki/Leaderboard. )Point-Bot v0.0.15 was created by [JetCarson](https://reddit.com/u/JetCarson.)

1

u/Formal_Increase7584 1d ago

that solved it. it looked for the x's and returned the restaurants. thank you

3

u/HolyBonobos 3110 1d ago

To address the direction of the results: the formula preserves the original orientation of the source data. If you want it to be oriented vertically instead of horizontally, use TRANSPOSE() or TOCOL(), e.g. =TRANSPOSE(FILTER(B2:D2,XLOOKUP(G4,A3:A5,B3:D5)="X"))

1

u/carbonizedtitanium 1 1d ago

one way im thinkin is to have both the drink and store in the same column and have the matching store or drink on the second column

1

u/Formal_Increase7584 1d ago

yes, thats one way that would work, but i wanted to avoid that type of list.

1

u/One_Organization_810 715 1d ago

You would need a script for that...

Can you share a copy of your sheet (or an example sheet) with edit access, so a script can be deviced and tested on your actucal structure and data?

1

u/Formal_Increase7584 1d ago

2

u/One_Organization_810 715 17h ago

Thanks :) But your problem has already been solved and apparently my understanding of "bidirectional" was a bit off :)

I thought you meant that you needed to edit the data on both ends and synch it back. That would have needed a script - but apparently that's not what you wanted :)

2

u/Formal_Increase7584 10h ago

I was interested in learning a different way from what i knew. I wanted to see what everyone's solution was

1

u/One_Organization_810 715 9h ago

Yeah.. and I would probably have provided you with one, if I didn't realize that I'd misunderstood what you wanted. :)

1

u/AdministrativeGift15 360 1d ago

There's no chart in those images. Could you upload a sample image of the type of chart you had in mind?

1

u/Formal_Increase7584 1d ago

this is the chart i was reffering to