-1

I am using the correct formula which has worked on other sheets:

=QUERY(Patients!$A:$K,"SELECT * WHERE F > date '"&TEXT(B2,"yyyy-mm-dd")&"' and A <= date '"&TEXT(C2,"yyyy-mm-dd")&"'ORDER BY F",1)

But the only thing it is bringing in is the headings row.

Cell B2 and C2 are dates that I want it to bring in the data from. B2 and C2 are vlookups against today's date formula so not sure if this is causing an issue, but has worked on another sheet. The vlookup tab is in itself an importrange sheet of values which may cause an issue but as mentioned, has worked ok already on another sheet.

Or could it be a problem in the Patients!$A$K sheet. I can clearly see dates which fall within the values I have specified in B2 and C2.

The Patients!$A$K tab is in itself a sheetgo import from an Excel doc so not sure if that could cause any issues? But has worked on other sheets.

Any ideas would be much appreciated!

0

Schoolboy error - didn't reference the F column for the 2nd part of the date. Was referencing A from a previous query

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.