+ Reply to Thread
Results 1 to 6 of 6

How to automatically list months preceding a certain month

  1. #1
    Registered User
    Join Date
    05-04-2015
    Location
    South Africa
    MS-Off Ver
    office for Mac
    Posts
    97

    Question How to automatically list months preceding a certain month

    Hi All, I hope someone can assist me please. I have a cell which reads a variable from another cell. This variable can be any month in the year. I would like to have the 11 months preceding this specific month listed depending on the set variable. How can I do this, as I cannot find anything on this formula? Or do I need a VBA? Any help would be appreciated.

  2. #2
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How to automatically list months preceding a certain month

    Maybe something like this will work. The date that is calculated is in C1 and this formula I entered in E1 and filled down:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This will also work.

    Enter this in E1
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Enter this in E2 and fill down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by newdoverman; 05-09-2015 at 07:27 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to automatically list months preceding a certain month

    Quote Originally Posted by ramatthews View Post
    This variable can be any month in the year.
    Is this a date? A month name (text string) like Feb? A month number?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    05-04-2015
    Location
    South Africa
    MS-Off Ver
    office for Mac
    Posts
    97

    Re: How to automatically list months preceding a certain month

    Hi Tony,

    This will be in the format of a month name i.e. Feb 2015. Thanks for the assistance.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to automatically list months preceding a certain month

    Maybe this...

    Data Range
    A
    1
    Feb 2015
    2
    Jan 2015
    3
    Dec 2014
    4
    Nov 2014
    5
    Oct 2014
    6
    Sep 2014
    7
    Aug 2014
    8
    Jul 2014
    9
    Jun 2014
    10
    May 2014
    11
    Apr 2014
    12
    Mar 2014


    A1 = some date in Feb 2015 formatted to display as mmm yyyy

    This formula entered in A2 and copied down to A12:

    =EDATE(A$1,-ROWS(A$2:A2))

    Apply the same format: mmm yyyy

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How to automatically list months preceding a certain month

    Here are a couple of ways to solve this to add to your collection. These are similar to my first post but arranged differently for simplicity.
    Attached Files Attached Files

+ 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. [SOLVED] Make row that automatically adds newest month + 2 nearest future months
    By cudh in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-25-2014, 08:40 AM
  2. [SOLVED] Formula to insert text in new column if preceding more than one of the preceding have val
    By aimeecrystalaid in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-04-2013, 11:47 PM
  3. Validation list (dependent on the result of the preceding list) + Concatenate
    By Elainefish in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-08-2013, 09:19 AM
  4. Replies: 1
    Last Post: 11-22-2011, 08:11 AM
  5. Replies: 7
    Last Post: 03-02-2011, 08: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