John
John

Reputation: 29

query one sheet based on cell in another sheet

My master data sheet is named MASTER. In my sheet named PRINT I want to be able to use a date picker, or somehow be prompted for a date, and then a Query pulls data from Master where date selected matches dates in MASTER column B. I have tried the following Query statement but it will only work if I change both sheets Date columns to TEXT format. I need to keep my date formats as is. If all that makes sense, I would really appreciate some help. My end goal is I just want a huge list of fabrication jobs, listed by date, to be queried and pulled to another sheet for printing. Leaving all Master data in tact and where the PRINT sheet can simply have a date change done by any user and get the list they need.

=Query(MASTER!A:P,ʺselect * where B ='ʺ&A2&ʺ'ʺ,0)

The above Query is on my TEST sheet where I have a date picker in column A2

Upvotes: 0

Views: 5079

Answers (1)

JPV
JPV

Reputation: 27242

Try:

=Query(MASTER!A:P,"select * where B =date"""&text(A2, "yyyy-mm-dd")&""" ",0)

and see if that works for you ?

Upvotes: 1

Related Questions