+ Reply to Thread
Results 1 to 6 of 6

Prior Month Formula

  1. #1
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2010
    Posts
    228

    Prior Month Formula

    Is it possible to make so that if Cell A2 shows the current month then A1 shows the prior month?

    In my workbook I have a dropdown menu for month. When a month is picked then a cell in another worksheet changes to that month. What is would like is for the cell next to that cell to change to the prior month.

    Ex. I pick January from the dropdown. Then the cell in another worksheet changes to January. The cell next to that should then change to December.

    Thanks!
    Last edited by freybe06; 02-15-2011 at 05:59 PM.

  2. #2
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: Prior Month Formula

    in A1

    EOMONTH(B1,-1) Format as mmm
    Windows 7 using Office 2007 & 2010

    Remember your [ code ] [ /code ] tags, makes reading soooo much easier

  3. #3
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,676

    Re: Prior Month Formula

    If you have the month as text in A1 e.g. January or July then this formula will give you the prior month as text

    =TEXT((1&A2)-1,"mmmm")
    Audere est facere

  4. #4
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2010
    Posts
    228

    Re: Prior Month Formula

    I keep getting a #VALUE! error.

  5. #5
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2010
    Posts
    228

    Re: Prior Month Formula

    daddylonglegs - that did it! Thanks to both of you for helping out!

  6. #6
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: Prior Month Formula

    Quote Originally Posted by freybe06 View Post
    I keep getting a #VALUE! error.
    Eomonth is part of the annalysis toolpack, if you've not already installed it then go into options, addins and make sure it's ticked.

    I assumed you'd have a date in B1 and if you did this should always show you the previous month. The actual date will be the last day of the previous month, formatted to mmm to reveal the shortened month name only jan feb etc,,

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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