+ Reply to Thread
Results 1 to 3 of 3

Year and month formula

  1. #1
    Forum Contributor
    Join Date
    06-30-2014
    Location
    London, England
    MS-Off Ver
    365 & 2010
    Posts
    100

    Year and month formula

    Hi,

    I hope someone can help?

    I have the below formula that was working pretty well until the change of year

    =YEAR(TODAY())&MOD(TEXT(MONTH(TODAY()),"dd")-2,12)+1

    This gives me a result of 201912.

    The problem is that it should read 201812 as I need to go one month back from January 2019. (December 2018)

    Any suggestions?

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Year and month formula

    Try

    =TEXT(EOMONTH(TODAY(),-1),"YYYYMM")

  3. #3
    Forum Contributor
    Join Date
    06-30-2014
    Location
    London, England
    MS-Off Ver
    365 & 2010
    Posts
    100

    Re: Year and month formula

    Thanks Jason.b75

    Gawd knows where I got mine from seeing that yours looks so simple

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Running Totals from 24 hours to month, month to year without year decreasing
    By Safetyintern in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-20-2015, 01:13 PM
  2. Graphing dates by month/year with 2 bars per month/year
    By Ellpoyohlokoh in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-22-2014, 05:25 AM
  3. Replies: 3
    Last Post: 09-04-2013, 10:49 AM
  4. If Column A Month and Year = ColumnB Todays Month and Year then send email
    By HACCStaff in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-15-2013, 12:47 AM
  5. Replies: 4
    Last Post: 02-14-2010, 05:21 AM
  6. formula for prior month & year of a month end date.
    By mikeburg in forum Excel General
    Replies: 2
    Last Post: 09-25-2007, 04:01 PM
  7. Formula to return last day of month for each month in year?
    By StargateFan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-03-2006, 12:10 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1