ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Help w/simple Date Formula please (https://www.excelbanter.com/excel-worksheet-functions/233258-help-w-simple-date-formula-please.html)

Dax Arroway

Help w/simple Date Formula please
 
I've got two columns (D, E) headed DOB and Age. Basically what I'm looking
for is a forumula which looks at D, puts the amount of years in E as in:
=DATEDIF(D210,TODAY(),"y")
but not display anything if D is blank.

What I came up with is:
=IF(D2="","",(DATEDIF(D2,TODAY(),"y")))
but that doesn't seem quite right. It works but Excel says there's an error
in it.

Any help please?
Thanks in advance.
--D.
--
I would give my left hand to be ambidextrous!

Pecoflyer[_354_]

Help w/simple Date Formula please
 

Hi,

I don't understand your sentence "It works but Excel says there's an
error
in it."

Which error do you get, and what works?

Dax Arroway;373842 Wrote:
I've got two columns (D, E) headed DOB and Age. Basically what I'm
looking
for is a forumula which looks at D, puts the amount of years in E as
in:
=DATEDIF(D210,TODAY(),"y")
but not display anything if D is blank.

What I came up with is:
=IF(D2="","",(DATEDIF(D2,TODAY(),"y")))
but that doesn't seem quite right. It works but Excel says there's an
error
in it.

Any help please?
Thanks in advance.
--D.
--
I would give my left hand to be ambidextrous!



--
Pecoflyer

Cheers -
------------------------------------------------------------------------
Pecoflyer's Profile: http://www.thecodecage.com/forumz/member.php?userid=14
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=104645


Dax Arroway

Help w/simple Date Formula please
 
A green little tab shows up in the top right corner of the cell and says that
there's an error in the formula. I can ignore it but I'm not sure what I'm
ignoring and I'm not Excel savvy enough to know if my formula is right or
not. It seems OK but Excel is telling me there's an error. I don't know why
and I'm hoping somone might be able to tell me.

I would give my left hand to be ambidextrous!


"Pecoflyer" wrote:


Hi,

I don't understand your sentence "It works but Excel says there's an
error
in it."

Which error do you get, and what works?

Dax Arroway;373842 Wrote:
I've got two columns (D, E) headed DOB and Age. Basically what I'm
looking
for is a forumula which looks at D, puts the amount of years in E as
in:
=DATEDIF(D210,TODAY(),"y")
but not display anything if D is blank.

What I came up with is:
=IF(D2="","",(DATEDIF(D2,TODAY(),"y")))
but that doesn't seem quite right. It works but Excel says there's an
error
in it.

Any help please?
Thanks in advance.
--D.
--
I would give my left hand to be ambidextrous!



--
Pecoflyer

Cheers -
------------------------------------------------------------------------
Pecoflyer's Profile: http://www.thecodecage.com/forumz/member.php?userid=14
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=104645



Marcelo

Help w/simple Date Formula please
 
There is no error on your formula,

what is the mesage excel is given?


--
pleae click yes if it was helpfull
regards from Brazil
Marcelo



"Dax Arroway" escreveu:

I've got two columns (D, E) headed DOB and Age. Basically what I'm looking
for is a forumula which looks at D, puts the amount of years in E as in:
=DATEDIF(D210,TODAY(),"y")
but not display anything if D is blank.

What I came up with is:
=IF(D2="","",(DATEDIF(D2,TODAY(),"y")))
but that doesn't seem quite right. It works but Excel says there's an error
in it.

Any help please?
Thanks in advance.
--D.
--
I would give my left hand to be ambidextrous!


Dax Arroway

Help w/simple Date Formula please
 
When I mouse over the flagged cell there's a bubble which says, "The formula
in this cell differs from the formulas in this area of this spreadsheet."
When I click the exclamation pointed yellow warning sign it says,
"Inconsistant formula."

Maybe someone formatted the cells as number instead of leaving it at
General.

....actually, I reformatted all the cells in that column and all the green
flags went away. I'm guessing that was it. Thanks for taking a look at this
and reasuring my formula. --Dax
--
I would give my left hand to be ambidextrous!


"Marcelo" wrote:

There is no error on your formula,

what is the mesage excel is given?


--
pleae click yes if it was helpfull
regards from Brazil
Marcelo



"Dax Arroway" escreveu:

I've got two columns (D, E) headed DOB and Age. Basically what I'm looking
for is a forumula which looks at D, puts the amount of years in E as in:
=DATEDIF(D210,TODAY(),"y")
but not display anything if D is blank.

What I came up with is:
=IF(D2="","",(DATEDIF(D2,TODAY(),"y")))
but that doesn't seem quite right. It works but Excel says there's an error
in it.

Any help please?
Thanks in advance.
--D.
--
I would give my left hand to be ambidextrous!


David Biddulph[_2_]

Help w/simple Date Formula please
 
No problem with that formula, but you could lose one pair of parentheses:
=IF(D2="","",DATEDIF(D2,TODAY(),"y"))
What error message do you get from Excel?
--
David Biddulph

Dax Arroway wrote:
I've got two columns (D, E) headed DOB and Age. Basically what I'm
looking for is a forumula which looks at D, puts the amount of years
in E as in: =DATEDIF(D210,TODAY(),"y")
but not display anything if D is blank.

What I came up with is:
=IF(D2="","",(DATEDIF(D2,TODAY(),"y")))
but that doesn't seem quite right. It works but Excel says there's
an error in it.

Any help please?
Thanks in advance.
--D.




Shane Devenshire[_2_]

Help w/simple Date Formula please
 
Hi,

The error "warning" is part of Excel Error Checking options, it often tells
you there "May be" and error.

You can simplify your formula to read:

=IF(D2,DATEDIF(D2,NOW(),"y"),"")

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Dax Arroway" wrote:

When I mouse over the flagged cell there's a bubble which says, "The formula
in this cell differs from the formulas in this area of this spreadsheet."
When I click the exclamation pointed yellow warning sign it says,
"Inconsistant formula."

Maybe someone formatted the cells as number instead of leaving it at
General.

...actually, I reformatted all the cells in that column and all the green
flags went away. I'm guessing that was it. Thanks for taking a look at this
and reasuring my formula. --Dax
--
I would give my left hand to be ambidextrous!


"Marcelo" wrote:

There is no error on your formula,

what is the mesage excel is given?


--
pleae click yes if it was helpfull
regards from Brazil
Marcelo



"Dax Arroway" escreveu:

I've got two columns (D, E) headed DOB and Age. Basically what I'm looking
for is a forumula which looks at D, puts the amount of years in E as in:
=DATEDIF(D210,TODAY(),"y")
but not display anything if D is blank.

What I came up with is:
=IF(D2="","",(DATEDIF(D2,TODAY(),"y")))
but that doesn't seem quite right. It works but Excel says there's an error
in it.

Any help please?
Thanks in advance.
--D.
--
I would give my left hand to be ambidextrous!



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

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