ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Today() Now() and other stories!!!! (https://www.excelbanter.com/excel-discussion-misc-queries/101186-today-now-other-stories.html)

Cobbcouk

Today() Now() and other stories!!!!
 

Hi,

I am trying to write a formula that will return a value of "Yes"; if
the date in cell E1 for arguments sake, is less than 18 years ago.
Conversely, if the date is more than 18 years ago it needs to return
"no".

Hope y'all can help?

Regards

G


--
Cobbcouk
------------------------------------------------------------------------
Cobbcouk's Profile: http://www.excelforum.com/member.php...o&userid=32143
View this thread: http://www.excelforum.com/showthread...hreadid=564779


mr_teacher

Today() Now() and other stories!!!!
 

Would this work for you?

=if((year(today())-year(e1))<18,"Yes","No")

Hope that helps

Regards

Carl

Cobbcouk Wrote:
Hi,

I am trying to write a formula that will return a value of "Yes"; if
the date in cell E1 for arguments sake, is less than 18 years ago.
Conversely, if the date is more than 18 years ago it needs to return
"no".

Hope y'all can help?

Regards

G



--
mr_teacher
------------------------------------------------------------------------
mr_teacher's Profile: http://www.excelforum.com/member.php...o&userid=34352
View this thread: http://www.excelforum.com/showthread...hreadid=564779


jetted

Today() Now() and other stories!!!!
 

see attach document


+-------------------------------------------------------------------+
|Filename: Book1.zip |
|Download: http://www.excelforum.com/attachment.php?postid=5095 |
+-------------------------------------------------------------------+

--
jetted
------------------------------------------------------------------------
jetted's Profile: http://www.excelforum.com/member.php...o&userid=17532
View this thread: http://www.excelforum.com/showthread...hreadid=564779


Cobbcouk

Today() Now() and other stories!!!!
 

HI,
The formula works for the year but not the day! I deal with a lot of
students and I need a formula to update as they turn 18. I was fooling
around with the same idea i.e. Year(Today().

Regards

G


--
Cobbcouk
------------------------------------------------------------------------
Cobbcouk's Profile: http://www.excelforum.com/member.php...o&userid=32143
View this thread: http://www.excelforum.com/showthread...hreadid=564779


Sloth

Today() Now() and other stories!!!!
 
=IF(DATEDIF(E1,TODAY(),"Y")<18,"Yes","No")

"Cobbcouk" wrote:


Hi,

I am trying to write a formula that will return a value of "Yes"; if
the date in cell E1 for arguments sake, is less than 18 years ago.
Conversely, if the date is more than 18 years ago it needs to return
"no".

Hope y'all can help?

Regards

G


--
Cobbcouk
------------------------------------------------------------------------
Cobbcouk's Profile: http://www.excelforum.com/member.php...o&userid=32143
View this thread: http://www.excelforum.com/showthread...hreadid=564779



mr_teacher

Today() Now() and other stories!!!!
 

Not sure if this is exactly hat you want but seems to work as a work
around on mine!!!

=IF(((TODAY()-E1)/6574.5)1,"No","Yes")

The 6574.5 being 18 multiplied by 365 1/4 days to get the correct
number f days?

Any better?

Carl


--
mr_teacher
------------------------------------------------------------------------
mr_teacher's Profile: http://www.excelforum.com/member.php...o&userid=34352
View this thread: http://www.excelforum.com/showthread...hreadid=564779


Stormy

Today() Now() and other stories!!!!
 
I believe this will work for age 18, replace 'x' with your cell reference to
the age.

=IF(DATE(YEAR(x)+18, MONTH(x), DAY(x)) < TODAY(), "Old Enough", "Too Young")

You avoid worrying about leap years by piecing the date together from
components.

"Cobbcouk" wrote:


Hi,

I am trying to write a formula that will return a value of "Yes"; if
the date in cell E1 for arguments sake, is less than 18 years ago.
Conversely, if the date is more than 18 years ago it needs to return
"no".

Hope y'all can help?

Regards

G


--
Cobbcouk
------------------------------------------------------------------------
Cobbcouk's Profile: http://www.excelforum.com/member.php...o&userid=32143
View this thread: http://www.excelforum.com/showthread...hreadid=564779



Cobbcouk

Today() Now() and other stories!!!!
 

:) Thanks Guys it works great:)


--
Cobbcouk
------------------------------------------------------------------------
Cobbcouk's Profile: http://www.excelforum.com/member.php...o&userid=32143
View this thread: http://www.excelforum.com/showthread...hreadid=564779



All times are GMT +1. The time now is 11:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com