#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Excel 2007 formulas

I am trying to write a formula for a class where we have to take todays date
(using the today function) and subtract it from a set of dates to see if the
people are over 18 or not. Im having trouble with the TODAY function.

every time i try to use it the T turns in to a lower cass letter and it says
that the function is invalad. any sugestions!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 281
Default Excel 2007 formulas

Hi,

Try this:

=YEAR(TODAY())-YEAR(A1)

asumed the age is in A2.

Thanks,
--
Farhad Hodjat


"Chub822" wrote:

I am trying to write a formula for a class where we have to take todays date
(using the today function) and subtract it from a set of dates to see if the
people are over 18 or not. Im having trouble with the TODAY function.

every time i try to use it the T turns in to a lower cass letter and it says
that the function is invalad. any sugestions!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Excel 2007 formulas

I don't use Excel 2007 but this will work:

A1 = birth date

=DATEDIF(A1,TODAY(),"Y")

That will return the *full* years of age.

Or, to test for the age being =18 *full* years:

=DATEDIF(A1,TODAY(),"Y")=18

This will return either TRUE or FALSE


--
Biff
Microsoft Excel MVP


"Chub822" wrote in message
...
I am trying to write a formula for a class where we have to take todays
date
(using the today function) and subtract it from a set of dates to see if
the
people are over 18 or not. Im having trouble with the TODAY function.

every time i try to use it the T turns in to a lower cass letter and it
says
that the function is invalad. any sugestions!



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Excel 2007 formulas

That formula will say someone is 18 if they are born any time in 1989,
including those who won't be 18 until the end of this year. DATEDIF would
be a better bet.
--
David Biddulph

"Farhad" wrote in message
...
Hi,

Try this:

=YEAR(TODAY())-YEAR(A1)

asumed the age is in A2.

Thanks,
--
Farhad Hodjat


"Chub822" wrote:

I am trying to write a formula for a class where we have to take todays
date
(using the today function) and subtract it from a set of dates to see if
the
people are over 18 or not. Im having trouble with the TODAY function.

every time i try to use it the T turns in to a lower cass letter and it
says
that the function is invalad. any sugestions!



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default Excel 2007 formulas

I am trying to write a formula for a class where we have to take todays
date
(using the today function) and subtract it from a set of dates to see if
the
people are over 18 or not. Im having trouble with the TODAY function.

every time i try to use it the T turns in to a lower cass letter and it
says
that the function is invalad. any sugestions!


Your description of what is happening is a little vague, but let me hazard a
guess... are you forgetting to put the open/close parentheses on the end of
the TODAY function (they are required)?

Rick



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Excel 2007 formulas

"Rick Rothstein (MVP - VB)" wrote in
message ...
I am trying to write a formula for a class where we have to take todays
date
(using the today function) and subtract it from a set of dates to see if
the
people are over 18 or not. Im having trouble with the TODAY function.

every time i try to use it the T turns in to a lower cass letter and it
says
that the function is invalad. any sugestions!


Your description of what is happening is a little vague, but let me hazard
a guess... are you forgetting to put the open/close parentheses on the end
of the TODAY function (they are required)?

Rick


Doing that would/should cause a #NAME? error. I've never experienced what
the OP describes. Is it maybe a new behavior to Excel 2007?

--
Biff
Microsoft Excel MVP


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default Excel 2007 formulas

I am trying to write a formula for a class where we have to take todays
date
(using the today function) and subtract it from a set of dates to see if
the
people are over 18 or not. Im having trouble with the TODAY function.

every time i try to use it the T turns in to a lower cass letter and it
says
that the function is invalad. any sugestions!


Your description of what is happening is a little vague, but let me
hazard a guess... are you forgetting to put the open/close parentheses on
the end of the TODAY function (they are required)?

Rick


Doing that would/should cause a #NAME? error. I've never experienced what
the OP describes. Is it maybe a new behavior to Excel 2007?


It does cause a #NAME? error which is sort of why I said his description of
what was happening was "vague" (he didn't mention **any** error). The reason
I made the guess I did is if the OP had typed in =Today (only capitalizing
the "T"), then after the error was generated, if you looked in the formula
bar, the equation had become =today (the "T" had turned into lower case as
the OP reported). I did say it was a guess, but if the OP had left the
parentheses off, what he described is sort of what happens (although, of
course, it isn't the main thing that happens).

Rick

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Excel 2007 formulas

Interesting!
If I try to enter =Today, without the parentheses, then I get =TODAY (all in
upper case) rather than turning the capital T to lower case. I do, of
course, also get the #NAME error.
--
David Biddulph

"Rick Rothstein (MVP - VB)" wrote in
message ...
I am trying to write a formula for a class where we have to take todays
date
(using the today function) and subtract it from a set of dates to see
if the
people are over 18 or not. Im having trouble with the TODAY function.

every time i try to use it the T turns in to a lower cass letter and it
says
that the function is invalad. any sugestions!

Your description of what is happening is a little vague, but let me
hazard a guess... are you forgetting to put the open/close parentheses
on the end of the TODAY function (they are required)?

Rick


Doing that would/should cause a #NAME? error. I've never experienced what
the OP describes. Is it maybe a new behavior to Excel 2007?


It does cause a #NAME? error which is sort of why I said his description
of what was happening was "vague" (he didn't mention **any** error). The
reason I made the guess I did is if the OP had typed in =Today (only
capitalizing the "T"), then after the error was generated, if you looked
in the formula bar, the equation had become =today (the "T" had turned
into lower case as the OP reported). I did say it was a guess, but if the
OP had left the parentheses off, what he described is sort of what happens
(although, of course, it isn't the main thing that happens).

Rick



  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default Excel 2007 formulas

Very interesting... I just retried it in XL2003 and XL2007... what seems to
happen is the first way you type it in is the way it will make it from then
on (for the rest of the session) no matter how you change the casing. Try
this, close down your version of Excel and then re-open it. Type this into a
cell....

=ToDaY

type it just like I did above. Now, go to another cell and type this in...

=today

Hit the enter key to commit it and then re-select the cell and look at the
formula bar... the lower case spelling should have changed to the casing you
used the very first time. So, my first observation was not correct because I
remember I had typed in =today first and then retried it with the first
letter capitalize. Anyway, this means we don't know what the OP's problem
really is (until he gives us more information).

Rick


"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
Interesting!
If I try to enter =Today, without the parentheses, then I get =TODAY (all
in upper case) rather than turning the capital T to lower case. I do, of
course, also get the #NAME error.
--
David Biddulph

"Rick Rothstein (MVP - VB)" wrote in
message ...
I am trying to write a formula for a class where we have to take
todays date
(using the today function) and subtract it from a set of dates to see
if the
people are over 18 or not. Im having trouble with the TODAY function.

every time i try to use it the T turns in to a lower cass letter and
it says
that the function is invalad. any sugestions!

Your description of what is happening is a little vague, but let me
hazard a guess... are you forgetting to put the open/close parentheses
on the end of the TODAY function (they are required)?

Rick

Doing that would/should cause a #NAME? error. I've never experienced
what the OP describes. Is it maybe a new behavior to Excel 2007?


It does cause a #NAME? error which is sort of why I said his description
of what was happening was "vague" (he didn't mention **any** error). The
reason I made the guess I did is if the OP had typed in =Today (only
capitalizing the "T"), then after the error was generated, if you looked
in the formula bar, the equation had become =today (the "T" had turned
into lower case as the OP reported). I did say it was a guess, but if the
OP had left the parentheses off, what he described is sort of what
happens (although, of course, it isn't the main thing that happens).

Rick




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formulas in excel 2007 donna Excel Discussion (Misc queries) 4 August 10th 07 02:52 PM
Excel 2007 - Where is the Accept Labels in Formulas Option? headly Excel Discussion (Misc queries) 3 June 8th 07 12:58 PM
excel 2007 formulas Anvil22 Excel Worksheet Functions 6 May 9th 07 07:29 PM
Excel 2007 conversion - this file contains labels in formulas Hunter Excel Discussion (Misc queries) 6 March 20th 07 01:00 PM
Using formulas from Quattro Pro in Excel 2007 Richard Excel Worksheet Functions 4 March 7th 07 01:12 AM


All times are GMT +1. The time now is 01:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"