Reputation: 10431
I have a Google Sheets worksheet Sheet1 where column E can be either a DATE, e.g. 2018-01-01 or NA or blank.
I want to create another worksheet Sheet2 with only the entries that look like a date, to then be able to create a Data Validation on another worksheet Sheet3 where the date column is only allowed to be entered if it's not already present in the combination of columns B and E in Sheet2.
I assumed I needed to use the =FILTER()
function but when I try:
=FILTER(E:E,ISDATE(E:E))
I get:
FILTER has mismatched range sizes. Expected row count: 18769, column count: 1. Actual row count: 1, column count: 1.
Any ideas?
Upvotes: 1
Views: 3620
Reputation: 11
I had a similar issue! I found another stack overflow answer and thought I should share it here.
This one worked for me:
=FILTER(E:E,ARRAYFORMULA(IF(ISDATE_STRICT({E:E}),TRUE,FALSE)))
Upvotes: 1
Reputation: 1
=ARRAYFORMULA(TO_DATE(QUERY(VALUE(Sheet1!E:E),
"select Col1 where Col1 > 40000", 0)))
Upvotes: 1
Reputation: 285
ISDATE won't work because it will return a boolean instead of an array (if all values are dates, it will return true, if even a single one isn't, it will return false).
However, for FILTER you'll need a second array.
I think you could try something like:
=ArrayFormula(iferror(IF(DATEVALUE(E:E),TRUE),FALSE))
And then take it from there with FILTER.
Upvotes: 2