YearFrac

D

Doug Mc

Here's my formula: =YEARFRAC(B3,$D$2)
I get an error (#NAME$)

What am I doing wrong?

Thanks,
Doug
 
J

JE McGimpsey

From XL Help ("YEARFRAC"):

If this function is not available, and returns the #NAME? error, install
and load the Analysis ToolPak add-in.
 
L

Lady Layla

You need Start date, End Date and Basis according to Help

But you also need to enter the dates as =date(yyyy,mm,dd) because you may have
problems if they are entered as text




:
: Here's my formula: =YEARFRAC(B3,$D$2)
: I get an error (#NAME$)
:
: What am I doing wrong?
:
: Thanks,
: Doug
:
:
 
D

Doug Mc

I'm using XL97. Does that make a difference?
And how would I "install and load the Analysis Toolpak add-in?"

Thanks,
Doug
 
J

JE McGimpsey

I don't have XL97 loaded, but I'd have thought that Help would have had
an entry about the Analysis Toolpak add-in.

Choose Tools/Add-ins... Check the ATP checkbox, then click OK to load
the ATP.
 
D

Doug Mc

I did "Analysis ToolPak" and "Analysis ToolPak - VBA" and clicked OK. It
didn't give me a message if it loaded anything or not. I did it twice.
Nothing changed.

Do I need to do something else??
Thanks again,
Doug
 
G

Gord Dibben

Doug

You won't get a message when ATP(don't need ATP for VBA) loads after checking
it in Tools>Add-ins.

Tools menu. Do you have "Data Analysis" entry at bottom?

If so, this means ATP is loaded.

Try hitting F9 to force a re-calculation of the cells.

Does #NAME go away?

Gord Dibben Excel MVP
 
D

Doug Mc

Yes, "Data Analysis" is there.
I hit f9 and got a date entered. Shouldn't I be getting a number of years,
etc.??
My first date is "07/26/32"; the second one is "11/17/04" and I got a result
of "03/12/00" (ignore the quotes; the cells are defined as dates.)

At least I now have something!
NOW, what am I doing wrong?

Thanks Gord,
Doug
 
G

Gord Dibben

Doug

With my setup(US) a date is entered d/m/y

m/d/y is text

26/07/32 returns July 26, 2032 in A1

17/11/04 returns November 17, 2004 in B1

=YEARFRAC(A1,B1,2) in C1 returns 28.091667 when formatted as General or
Number.

Gord Dibben Excel MVP
 
M

Max

Try changing the format of the formula cell
(the one with the : =YEARFRAC(B3,$D$2))
to either "General" or "Number"

[Click Format > Cells > General (or Number)]
 
D

Doug Mc

Thanks Max,
That worked out just fine.

Doug


Max said:
Try changing the format of the formula cell
(the one with the : =YEARFRAC(B3,$D$2))
to either "General" or "Number"

[Click Format > Cells > General (or Number)]

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <at>yahoo<dot>com
----
Doug Mc said:
Yes, "Data Analysis" is there.
I hit f9 and got a date entered. Shouldn't I be getting a number of years,
etc.??
My first date is "07/26/32"; the second one is "11/17/04" and I got a result
of "03/12/00" (ignore the quotes; the cells are defined as dates.)

At least I now have something!
NOW, what am I doing wrong?

Thanks Gord,
Doug
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top