Value & Date Validation

Equin0x

New Member
Joined
Jun 18, 2009
Messages
25
Office Version
  1. 2016
Platform
  1. Windows
Hello

I'm trying to work out a formula that will do the following:

If E8 = "Yes" and F8 is greater than 14 days old from todays date, write "Older than 14 days" in J8.

I can then copy this formula down through E8:F1000, as there will be upto 1000 rows to perform the validation on.

Code:
=IF((TODAY()-$F13)>14,"Over 14 Days","")
This works for checking just the date, but doesn't include the Yes check as well. I've tried
Code:
=IF(E13="Yes"&(F13>=TODAY()-14),"T","F")
and various other ways, but I can't seem to make this work.

Any help greatly appreciated, thanks.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
=IF(AND((TODAY()-$F9)>14,E13="Yes"),"Over 14 Days","")

The & is used to concatenate two strings. You needed the AND() operator.
 
Upvote 0
Amazing, thanks guys, works great. I was forgetting all about AND. Schoolboy error :)
 
Upvote 0
Hi

Would it be possible to slightly extend the functionality of this, possibly requiring turning it into VBA, so that it covers 3 validation rules.

=IF(AND($B2="Accepted",TODAY()-$C2>21),"Over 3 weeks","")
=IF(AND($B2="Requested",TODAY()-$C2>42),"Over 6 weeks","")
=IF(AND($B2="Pending",TODAY()-$C2>2),"Over 2 days","")

Thanks.
 
Upvote 0
Try

=IF(AND($B2="Accepted",TODAY()-$C2>42),"Over 3 weeks",IF(AND($B2="Requested",TODAY()-$C2>42),"Over 6 weeks",IF(AND($B2="Pending",TODAY()-$C2>2),"Over 2 days","")))
 
Upvote 0

Forum statistics

Threads
1,224,507
Messages
6,179,181
Members
452,893
Latest member
denay

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