Time formula with conditions

Status
Not open for further replies.

Andrew Skibbz

New Member
Joined
Mar 29, 2017
Messages
28
Hi, I have two columns, one with a date and time (column A) and one with a status (column B).

I want a third column(Column C) to say if the date and time in column A is less than today's date and the status in column B is not equal to 'COMPLETED' then move the date to today's date at 07:00:00

Any help greatly appreciated.

Best,

Andrew
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Try this:

=IF(AND(A2<>"",A2 < TODAY(),TRIM(B2)<>"COMPLETED"),TODAY()+TIME(7,0,0),A2)<today(),trim(b2)<></today(),trim(b2)<>
 
Last edited:
Upvote 0
Steve,

If I want to add in an additional rule if A2 <>= "Completed" or "Cancelled", how would I write that formula?
Thanks in advance!
Andrew
 
Upvote 0
Add it into the AND as its an AND condition. You dont want the cell to equal Completed and you dont want the cell to equal Cancelled.

=IF(AND(A2<>"",A2 < TODAY(),TRIM(B2)<>"COMPLETED",TRIM(B2)<>"CANCELLED"),TODAY()+TIME(7,0,0),A2)
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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