I have created a filtered view but need to filter columns by OR instead of AND e.g. date in column N is in January 2020 OR the date range in column T is in January 2020 but this doesn't appear to be achievable without an OR custom formula.
Why does the following not work, please: =OR(N:N="date(2020,01)",T:T="date(2020,01)")
CodePudding user response:
Your formula does not work because you are comparing dates to string literals, and because the date()
function requires three arguments.
To more simply compare the year and month, while ignoring the day of the month, use text()
, like this:
=or( text(N:N, "yyyy-MM") = "2020-01", text(T:T, "yyyy-MM") = "2020-01" )
CodePudding user response:
use:
=(N:N=DATE(2021,1,1)) (T:T=DATE(2021,1,1))