ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel 2007 formulas (https://www.excelbanter.com/excel-discussion-misc-queries/158366-excel-2007-formulas.html)

Chub822

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!

Farhad

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!


T. Valko

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!




David Biddulph[_2_]

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!




Rick Rothstein \(MVP - VB\)

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


T. Valko

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



Rick Rothstein \(MVP - VB\)

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


David Biddulph[_2_]

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




Rick Rothstein \(MVP - VB\)

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






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

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