SOLVED

IF (logical;yes; no) How to use a Date function in the result ?

Copper Contributor

I need to add a Date function as a result in an IF formula.

 

I tried =IF(R4>0;Date;"") but the result is #¿....  an error. 

 

How I would do it ?

 

Thank you any help

3 Replies
best response confirmed by Platinum2000 (Copper Contributor)
Solution
DATE must have arguments for YEAR, MONTH, and DAY. For example, your formula might look like this:
=IF(R4>0,
DATE(2019,3,18),
“”)
The formula returns March 18, 2019, if the value of R4 is more than 0; otherwise, it returns an empty text (“”).
Thank you Twifoo, it was a bad command I knew, I guessed at beginning maybe this IF command would not accept a funtion in its results, but then I saw a sample, so I thank you very much.
In the formula, DATE returns the value_if_true argument of IF. As you will discover, you can use a function to return an argument of another function. Good luck.
1 best response

Accepted Solutions
best response confirmed by Platinum2000 (Copper Contributor)
Solution
DATE must have arguments for YEAR, MONTH, and DAY. For example, your formula might look like this:
=IF(R4>0,
DATE(2019,3,18),
“”)
The formula returns March 18, 2019, if the value of R4 is more than 0; otherwise, it returns an empty text (“”).

View solution in original post