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 ...
HansVogelaar
Nov 15, 2024MVP
Formula 1:
=IF(AND(K3>=DATE(2024,1,1),K3<=DATE(2024,6,30)),"CO16",IF(OR(K3>=DATE(2024,7,1),K3<=DATE(2024,12,31)),"CO17",""))
or shorter
=IF(AND(K3>=DATE(2024,1,1),K3<=DATE(2024,6,30)),"CO16","CO17")
Formula 2:
=COUNTIFS('DC All'!K:K,">="&DATE(2024,1,1),'DC All'!K:K,"<="&DATE(2024,6,30),'DC All'!S:S, A1)