1

I have to face some problem about my Googlesheets Data. I want to filter my googlesheets data between two dates and also filter more conditions at the same time in same sheets. Below are given some sample data.

https://docs.google.com/spreadsheets/d/1h5PW52PoMUxXtrqEmfXSCWu_OKXVO8IwUbHqcqSPRzs/edit?usp=share_link

Basically, I want to filter data between two date & two more conditions at a same time in same sheets.

Please help me about this issues.

Thanks

I am trying to hard to solve this issues but I cann't solve this with myself. so if anyone solve this issues then please do this.

I'm very glad for all of you.

Thanks

player0
  • 124,011
  • 12
  • 67
  • 124

2 Answers2

0

You can try:

=query('Raw Data'!A2:I,"Select * Where B >= date '"&text(A7,"YYYY-MM-DD")&"' AND B<= date '"&text(B7,"YYYY-MM-DD")&"' AND C contains '"&A10&"' AND D contains '"&A13&"'")

Or, if you want to leave the dates empty:

=query('Raw Data'!A2:I,"Select * Where C contains '"&A10&"' AND D contains '"&A13&"'"&if(A7="",""," AND B >= date '"&text(A7,"YYYY-MM-DD")&"'"&if(B7="",""," AND B<= date '"&text(B7,"YYYY-MM-DD")&"'")))

Martín
  • 7,849
  • 2
  • 3
  • 13
0

use:

=IFERROR(QUERY('Raw Data'!A2:I, 
 "where 1=1 "&
  IF(A7="",, " and B >= date '"&TEXT(A7, "e-m-d")&"'")&
  IF(B7="",, " and B <= date '"&TEXT(B7, "e-m-d")&"'")&
  IF(A10="",," and C contains '"&A10&"'")&
  IF(A13="",," and D contains '"&A13&"'"), ), "no data found")

enter image description here

player0
  • 124,011
  • 12
  • 67
  • 124