Excel basic IF statement does not work

Copper Contributor

I have an issue with using the IF function. 

Originally I wanted to only execute a specific function if todays date was after a certain date. 

I used =IF(TODAY()>=DATEVALUE("01/03/2022"), SUM(D3;-D8;D9), "")

I tried different versions but every time this pop-up appeared:

image.png

So I figured the statement was probably wrong and I resorted to trying out the basic statement from the manual (=IF(C2="YES",1,2), still the same pop-up appeared. I scoured the net and found that maybe I had to change my regional settings so I did that but it still does not work. 

Does anyone know why I can't do even the simplest IF statements?

 

I use Microsoft excel for Mac version 16.57

1 Reply
Hello DertjeR! There were errors in the syntax of your IF function. Try this:
=IF(TODAY()>=1/3/2022,SUM(D3,-D8,D9),"")
If possible, i would urge you to use a cell reference instead of hard coding the date in the "Logical Test" argument of the IF function.

Example: =IF(TODAY()>=D1,SUM(D3,-D8,D9),"") where cell D1 contains the date 1/3/22.