[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Eomonth formula error

Posted on 2012-08-16
Medium Priority
Last Modified: 2012-08-16
Hi Experts

I am getting a #Name error when I insert the following
Formula in cell B2 =EOMonth(A2,0)+1 when a1 say sep-12
I want B2 to say October 12...
Question by:route217
  • 3
  • 2
LVL 24

Expert Comment

ID: 38299736
the second value after the column will shift the number of months (not using +1)
=EOMonth(A2,1) though your formula should still return the first of the next month.
And your error is likely due to the value in A2 being text, not a date.
try typing 01/09/2012 in celss A2 to test if this is the case.

Author Comment

ID: 38299747
Many thanks for the feedback

Author Comment

ID: 38299773
Hi the barman

I am not after the first of the next month but "October 12" as the end result.
LVL 24

Accepted Solution

Steve earned 2000 total points
ID: 38299846
The EOmonth formula returns an "Excel Date" such as '43564' which then formats to whichever the cell is set to...

To get the month as you wish you would need to take the date and then format it:

for example:

=format(eomonth(now(),1),"mmmm yy")

But this still requires a date where I have put Now()

or change the cell format to "mmmm yy", but this would still have an excel date in the cell.
LVL 24

Expert Comment

ID: 38299907
Where above it says =Format it should be =Text the Format is a function of VBA not an Excel formula :)

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question