EOMonth Error - odd Excel 2003 behaviour

G

Guest

(I posted this to the Worsheet Functions area as well but this may be more
appropriate.)

I am importing date into excel via an external data query with Access. In
excel I have the following formula:

=IF(ISERROR((EOMONTH(B2,-1))+1),0,(EOMONTH(B2,-1)+1))
where B2 contains a date imported from Access (in date format, not text).

When I first set up the formula, it worked fine and I got the desired
result. However, when I refresh my data the result changes to 1/0/1900. In
other words, it's giving me "0" because it's saying it's an ISERROR. When I
change the formula to "=EOMONTH(B2,-1)+1" I get a #NAME error message.

I find this extremely odd because:
1) I have the Analysis Tookpack Installed (I'm running Excel 2003)
2) The formula worked fine before.
3) When I undo my data refresh, the formula still does not work

HELP!!! Is there a better way to return the first day of the month without
risking this issue with EOMONTH?

Thanks!
 
G

Guest

The topic of this group is things that cause Excel to crash, so Worksheet
Functions was more appropriate.

#NAME? means that Excel doesn't recognize the EOMONTH function. Help for
EOMONTH explains that this occurs when you don't have the Analysis ToolPak
Add-In loaded.

Jerry
 

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