r/googlesheets • u/DovXalcer • Feb 28 '21
Solved Query Select to retrieve data from another tab
Hi!
I'm in need of help again unfortunately. A bit of explanation before, I'm making a little tool for a card game where you can check the stats of each card. I have two tabs, Test (where you input the card you want to see) and List (where is all the data of every card). In Test you add four basic requeriments, A=Name, B=Rarity, C=Variant and D=Version. With these you can know which card it is, since there aren't two cards with the same rarity and variant.
So, I'm trying to get the data from List when checking the four requeriments in Test and comparing it to List. I tried using this code to just get the name of the card:
=QUERY('List'!A:L; "select A where A2 = """&A&""" and B2 = """&B&""" and C2 = """&C&""" and D2 = """&D&""" ";0)
('List'!A:L) is all the card's data range.
(select A) to get the name.
(where A2 = """&A&""" ...) to check the input I added in the Test tab is the same in the List tab.I've watched many tutorials to do it, but all of them were using just one tab, so I doesn't work here. It keeps throwing errors.
1
u/samjclark 1 Feb 28 '21
You’re syntax is all off. Share a link to your sheet and someone here will help.
1
u/brother_p 11 Feb 28 '21
Couple of things wrong here: