Eomonth formula error

Posted on 2012-08-16
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
    LVL 24

    Expert Comment

    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

    Many thanks for the feedback

    Author Comment

    Hi the barman

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

    Accepted Solution

    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

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
    Sometimes we don't want to show zeros in our Excel spreadsheets. This is sometimes most evident in our charts. Look at the chart below, all the zero values are visible. I think that all will agree with the fact that zero values are not looking nice …
    This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
    This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now