-1

Here's the formula I have. Please evaluate and let me know if you see any issues.

=(query(importrange("sheetLink","FormResponses"),"Select Col1, Col4, Col5 Where Col3 Contains '"&EmployeeName&"' And Col4 >= '"&ReportStartDate&"' And Col4 <= '"&ReportEndDate&"' And Col8 = '"&JobName&"'",-1))

Any help you could give will be greatly appreciated.

Rubén
  • 34,714
  • 9
  • 70
  • 166
Ros Posey
  • 3
  • 2

2 Answers2

0

You have to do this to make sure the dates work properly:

=query({A:H},"Select Col1, Col4, Col5 Where Col3 Contains '"&EmployeeName&"' And Col4 >= date '"&text(ReportStartDate,"yyyy-mm-dd")&"' And Col4 <= date '"&text(ReportEndDate,"yyyy-mm-dd")&"' And Col8 = '"&JobName&"'",1)

enter image description here

Tom Sharpe
  • 30,727
  • 5
  • 24
  • 37
0

The actual function that worked properly with the IMPORTRANGE function is as follows:

(query(IMPORTRANGE("1qDKiRFFFnX5ORvleTIAoEcxD0WDjGopvA5UqcWVOfNs","FormResponses"),"Select Col1, Col4, Col5, Col6, Col7, Col8, Col10 Where Col3= '"&EmployeeName&"' and Col4>= Date '"&Text(DateValue(ReportStartDate),"YYYY-MM-DD")&"' and Col4<= Date '"&Text(DateValue(ReportEndDate),"YYYY-MM-DD")&"' Format Col4 'MM/DD/YY', Col7 '$#,##0.00'",-1))

Rubén
  • 34,714
  • 9
  • 70
  • 166
Ros Posey
  • 3
  • 2