IF function is returning FALSE

Cloud67

New Member
Joined
Mar 13, 2019
Messages
20
Hello,

I am trying to get today's date in a column if it meet two conditions. if one column say "Completed" and other column is "not empty" means if the date is already there. I am using following formula.

=IF([@[End Date]]="",IF([@Progress]="Completed",[@[End Date]]=TODAY(),"IT is not Completed"),"End Date is not Empty")

I am getting following result:

1- When End Date is empty: "IT is not Completed"
2- When End Date is Empty and Progress has Completed: "FALSE"
3- When End Date is not Empty: "End Date is not Empty"

So it is giving expecting result except when it meet the both condition like number 2. I have tried to change Today() to simple text like "TT" but still it is giving same issue.

I would greatly appreciate your help.

Thanks,
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
I am trying to get today's date in a column if it meet two conditions.
I think you are missing the AND operator.
If you are checking for more than one condition, you need to use the AND function if all conditions must be true, or the OR function if any one of the conditions must be true.

The structure should look like:
=IF(AND(condition 1, condition 2),what to return if both true,what to return otherwise)
 
Upvote 0
I think you are missing the AND operator.
If you are checking for more than one condition, you need to use the AND function if all conditions must be true, or the OR function if any one of the conditions must be true.

The structure should look like:
=IF(AND(condition 1, condition 2),what to return if both true,what to return otherwise)
Thanks for your reply, It is still doing the same thing means when both conditions are met, it is giving "FALSE".

=IF(AND([@[End Date]]="",[@Progress]="Completed"), [@[End Date]]=TODAY(),"Conditions are not met")
 
Upvote 0
You have this in the "what to return if both true" argument:
VBA Code:
[@[End Date]]=TODAY()

That is a boolean argument (a comparison of two values). So it will simply return TRUE or FALSE.
If you want to return a specific value, put the value you want in that argument, not a boolean comparison.
If you want it to return the current date, just put:
Excel Formula:
TODAY()
in that argument.

Note that in Excel formulas, you do NOT tell it what cell to return the value to. That is not how formulas work.
Excel formulas can only return values to the cell that the formula is located in.
So you need to put the formula in the cell where you want the returned result.
 
Upvote 0
You have this in the "what to return if both true" argument:
VBA Code:
[@[End Date]]=TODAY()

That is a boolean argument (a comparison of two values). So it will simply return TRUE or FALSE.
If you want to return a specific value, put the value you want in that argument, not a boolean comparison.
If you want it to return the current date, just put:
Excel Formula:
TODAY()
in that argument.

Note that in Excel formulas, you do NOT tell it what cell to return the value to. That is not how formulas work.
Excel formulas can only return values to the cell that the formula is located in.
So you need to put the formula in the cell where you want the returned result.
 
Upvote 0
Thanks for the explanation. Is it possible through function to enter todays date when one column say "Completed" but do not update it later like Today() function. I cannot use macro as I cannot use xlsm file.
 
Upvote 0

Forum statistics

Threads
1,215,487
Messages
6,125,086
Members
449,206
Latest member
ralemanygarcia

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top