Search code examples
dategoogle-sheetsgoogle-sheets-formulaifs

IFS formula with date types as conditions


I have two different date types in my table: the first is simple YYYY-MM-DD, the second contains the week number and year.

How is it possible to build an IFS formula, where these two date types are conditions? Like:

=IFS(A1="YYYY-MM-DD", "A", A1="WWYYYY", "B")

Solution

  • You may simply use following formula:

    =IFS(LEN(A1)=10,"A",len(A1)=6,"B")