IF Statement Returns FALSE Instead of the Specified Value

2.4k Views Asked by At

IF statement returns FALSE instead of the specified value

Below is the formula

=IF(CJ6="Yes";IF(AND(CL6-CC6<=0);"0";IF(AND(CL6-CC6<=364;CL6-CC6>=0);(CL6-CC6);IF(CL6-CC6>364;"365";"0"))))

May you advise on where the error is sitting in, I can't get to crack it.

Regards, Morgs

1

There are 1 best solutions below

3
On

It seems like you didn't specify [value_if_false] as Chris said above.

I fixed the formula. Now it gives the specified value:

=IF(CJ6="Yes";IF(AND(CL6-CC6<=0);"0";IF(AND(CL6-CC6<=364;CL6-CC6>=0);(CL6-CC6);IF(CL6-CC6>364;"365";"0")));"Desired Value")

The "Desired Value" is the if-false value of the first IF formula. You can change it to whatever you want it to be.