简体   繁体   中英

How to use the Query and Import Range in Google Sheets with a Date Criteria?

I have two separate workbooks, I would like to bring over the date value found in column E as long as it's not a null value. The formula below brings over the first value found in the range you see below but nothing else and I can't figure out why. I should have about 2400 values being brought over.

=query({importrange("workbookadress","Sheet1!E2:E3000")},"Where Col1 >='01/01/1900'",1)

What am I missing?

=query({importrange("workbookadress","Sheet1:E2,E3000")},"Where Col1 >= date '1900-01-01' ",1)

Col1 >= date '1900-01-01' is the notation (yyyy-mm-dd).

If you want to get the date from a cell value, then you'd need to use:

Col1 >= date 'xxx' where xxx is:

"&text(Z1,"yyyy-mm-dd")&" where Z1 is your cell.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM