Forum Discussion
IF Statement in excel
I am trying to do a IF statement to flag when a number of days between to dates exceeds 90 day, but I am struggling and keep getting error. =IF(E83>E84,”Validity close to Expiry”,”Valid”). What am I doing wrong?
6 Replies
- NikolinoDEPlatinum Contributor
=IF(E83>=E84,”Validity close to Expiry”,”Valid”
Check the quotes in the formula, or better put new ones if the formula is a copy.
Enclosed in the inserted file are two further suggested solutions.
Thx
Nikolino
- NerinaKouga2021Copper ContributorThank you very much.
- Riny_van_EekelenPlatinum Contributor
NerinaKouga2021 In principle, the formula is correct. It will display ".....close to expiry" when E83 is greater than E84, and "Valid" when it is not.
You haven't worked in the 90 day condition though. What exactly is in E83 and E84 and what error do you get?
- NerinaKouga2021Copper ContributorE83 is the total number of days between two cells and E84 is the 90days. I was playing around in a dummy excel document to get the formula right before I copy it to the correct document I am working on. So the cells will change, but the condition will remain the same.
- Riny_van_EekelenPlatinum Contributor
NerinaKouga2021Have a look at the attached file. A small example demonstrating that the formula should work. Perhaps you local system setting require a semi-colon to separate the arguments in the formula. If so, that will automatically be done when you open the file.