Excel basic IF statement does not work

%3CLINGO-SUB%20id%3D%22lingo-sub-3103974%22%20slang%3D%22en-US%22%3EExcel%20basic%20IF%20statement%20does%20not%20work%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3103974%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20an%20issue%20with%20using%20the%20IF%20function.%26nbsp%3B%3C%2FP%3E%3CP%3EOriginally%20I%20wanted%20to%20only%20execute%20a%20specific%20function%20if%20todays%20date%20was%20after%20a%20certain%20date.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20used%20%3DIF(TODAY()%26gt%3B%3DDATEVALUE(%2201%2F03%2F2022%22)%2C%20SUM(D3%3B-D8%3BD9)%2C%20%22%22)%3C%2FP%3E%3CP%3EI%20tried%20different%20versions%20but%20every%20time%20this%20pop-up%20appeared%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F344483iD7B40159BCF458FF%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ESo%20I%20figured%20the%20statement%20was%20probably%20wrong%20and%20I%20resorted%20to%20trying%20out%20the%20basic%20statement%20from%20the%20manual%20(%3DIF(C2%3D%22YES%22%2C1%2C2)%2C%20still%20the%20same%20pop-up%20appeared.%20I%20scoured%20the%20net%20and%20found%20that%20maybe%20I%20had%20to%20change%20my%20regional%20settings%20so%20I%20did%20that%20but%20it%20still%20does%20not%20work.%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20anyone%20know%20why%20I%20can't%20do%20even%20the%20simplest%20IF%20statements%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20use%20Microsoft%20excel%20for%20Mac%20version%2016.57%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3103974%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3107496%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20basic%20IF%20statement%20does%20not%20work%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3107496%22%20slang%3D%22en-US%22%3EHello%20DertjeR!%20There%20were%20errors%20in%20the%20syntax%20of%20your%20IF%20function.%20Try%20this%3A%3CBR%20%2F%3E%3DIF(TODAY()%26gt%3B%3D1%2F3%2F2022%2CSUM(D3%2C-D8%2CD9)%2C%22%22)%3CBR%20%2F%3EIf%20possible%2C%20i%20would%20urge%20you%20to%20use%20a%20cell%20reference%20instead%20of%20hard%20coding%20the%20date%20in%20the%20%22Logical%20Test%22%20argument%20of%20the%20IF%20function.%3CBR%20%2F%3E%3CBR%20%2F%3EExample%3A%20%3DIF(TODAY()%26gt%3B%3DD1%2CSUM(D3%2C-D8%2CD9)%2C%22%22)%20where%20cell%20D1%20contains%20the%20date%201%2F3%2F22.%3C%2FLINGO-BODY%3E
Occasional Visitor

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.