Forum Discussion
jbtm
Nov 15, 2024Copper Contributor
Date and countifs formulas not working
Hi! I am trying to use two formulas, and neither are returning the values they should. FORMULA 1 The first formula should be inputting a value based on a date range. I want the cell to say CO16 ...
SergeiBaklan
Nov 15, 2024Diamond Contributor
More variants for Formula 1, assuming you could have dates out of year 2024 (or blank cells)
=IF( K3>DATE(2024,12,31), "",
IF( K3>DATE(2024,6,30), "CO17",
IF( K3>DATE(2023,12,31), "CO16", "")
) )
or
= SWITCH( TRUE,
K3 > DATE(2024,12,31), "",
K3 > DATE(2024,6,30), "CO17",
K3 > DATE(2023,12,31), "CO16",
""
)
or
=IFS(
K3 > DATE(2024,12,31), "",
K3 > DATE(2024,6,30), "CO17",
K3 > DATE(2023,12,31), "CO16",
TRUE, ""
)