Warm tip: This article is reproduced from serverfault.com, please click

Query when a range of cells on another tab match cells on the current tab

发布于 2020-11-28 21:58:16

I'm using Google Sheets to try to create an invoice. Currently, employees fill out a google form that feeds to a Google Sheet (GS). I'm trying to create an easy way to make an invoice by selecting each client.

As you can see on this form, I have a ref tab set up so I can enter in billing addresses and such. My second tab in the GS is the invoice. And my third tab is the responses I get from the form.

I have the first part done on the Invoice form where I can select the Client Name and the billing information comes up. But I can't get the meat of the invoice to work. I want to only pull up certain columns off of the Form Response Tab if they match the client name. The closest I've gotten it to work is =QUERY('Form Responses 1'!B2:K, "A, B, C, D, E, F where 'Form Responses 1'!A2:A ' "& C5 &"' )")

Can anyone help?

Questioner
DC1099
Viewed
0
JPV 2020-11-30 01:27:20

See if this works

=QUERY('Form Responses 1'!A2:K, "Select B, C, D, E, F, G where A ='"& C5 &"'",0)

Also see the highlighted cell in the INVOICES tab.