Forum Discussion
Benjamin Boehrns
Jun 16, 2018Copper Contributor
Using the Date Function within the IF Function
Hello! I am attempting to make a monthly template which can be used for the next several years to track some data. My goal is to make this template in a fashion to self-update if a few key components...
SergeiBaklan
Jun 16, 2018Diamond Contributor
Hi Benjamin,
Sorry, but I didn't catch how it works, with sample file could be easier. Your formula like
=IF(A1=3,"=Date(2019,A1,31)")
returns text "=Date(2019,A1,31)" if number 3 is in A1, otherwise FALSE.
If you'd like to return the date that could be
=IF(A1=3,DATE(2019,A1,31))
or even better
=IF(A1=3,EOMONTH(DATE(2019,A1,1),0))
not to depend on number of days in the month