Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Feb 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Return Month (2003)

    Is there a formula that will look at a date such as 07/26/2006 and turn it into the month and year only? I have a long list but nothing we try actually turns the dates into the month and year only. You can format the cell to look like the month and year but when you actually click on it the complete date is there then we tried copy and paste special with value and that didn't work. We need to change it so we can chart out by moth and year only.

    Thanks for the help.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Return Month (2003)

    With a date in A1, you can use

    =A1-DAY(A1)+1

    This will return the first day of the month. Format the cell with the formulas the way you want. You can use these values to aggregate by month.

  3. #3
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Lawrence, Kansas, USA
    Posts
    202
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Return Month (2003)

    Suppose that 12/14/2007 is in A1

    If you want the date end of the month you can use =eomonth(A1,0).

    If you want text that is 12-2007, you need to use the following =month(A1)&"-"&year(a1).

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Return Month (2003)

    Remark (for others reading this thread): in Excel 2003 and earlier versions, the EOMONTH function is part of the Analysis Toolpak add-in; this add-in has to be installed (in Tools | Add-Ins...) if you want to use this function.
    In Excel 2007, EOMONTH and all other functions from the Analysis Toolpak have been incorporated in Excel itself.

  5. #5
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Return Month (2003).

    What kind of chart are you using? If it's a pivot chart you can group by year and month in the pivot table. If it's a standard chart, you probably want a consistent day of the month so one of the other solutions given will work. For info, you can use <code>=TEXT(A1,"mm-yyyy")</code> to return a text representation of a date formatted as month-year.
    Regards,
    Rory

    Microsoft MVP - Excel

  6. #6
    New Lounger
    Join Date
    Feb 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Return Month (2003).

    Thanks for all your help. The last post =TEXT(A1,"mm-yyyy") solved the problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •