Date function returns #NUM!

J

jtushman

All,

I need some help sorting out a problem with dates.

In G8: 12/31/1995 (serial value of: 35064)
G9, has the formula: =DATE(YEAR(G8),MONTH(G8)+2,1)-1 and yields #NUM!
(the purpose of the formula is to give me the last day of the next
month)

If I copy these two cells into a new workbook, I get the desired,
1/31/1996.

What could be causing this erratic behavior with my excel? The
workbook that I am modifying was created originally in Excel '97

Thanks!

Jonathan
 
B

Biff

Hi!

Not sure why you're getting #NUM!.

The formula works for me. It can be written as:

=DATE(YEAR(G8),MONTH(G8)+2,0)

But either way it returns the correct date. Even if G8 was a TEXT date it
would still work so I can't see why you'd get a #NUM! error.

Biff
 
H

Harlan Grove

(e-mail address removed) wrote...
....
In G8: 12/31/1995 (serial value of: 35064)
G9, has the formula: =DATE(YEAR(G8),MONTH(G8)+2,1)-1 and yields #NUM!
(the purpose of the formula is to give me the last day of the next
month)

If I copy these two cells into a new workbook, I get the desired,
1/31/1996.

What could be causing this erratic behavior with my excel? The
workbook that I am modifying was created originally in Excel '97

Tools > Options, select the Transition tab, uncheck 'Transition formula
evaluation'. Since [123] transition settings are workbook-specific, you
could copy the date constant and the formula returning #NUM! into
another workbook with this setting disabled, and the formula would
work, returning 1/31/1996 as expected.
 

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

Top