+ Reply to Thread
Results 1 to 5 of 5

Drop Down list showing current month & year and formula to show Prev Year

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2016
    Posts
    1,195

    Drop Down list showing current month & year and formula to show Prev Year

    I have data showing current years data by month as well as the previous years data

    I have set up a drop down list for the current year as well as formulas so that when the month and year is selected then the applicable data is displayed

    I also want to display the previous month and year data , but only want a drop list for the month and year for the current years data. When the drop down list is selected , then the month and year pertaining to the previous year must be displayed


    for eg if I select Feb-20 then Feb-19 data to be displayed as well , without have to have two drop down lists


    I have attached sample data


    It would be appreciated if someone could kindly assist me
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    7,027

    Re: Drop Down list showing current month & year and formula to show Prev Year

    Try:
    =TEXT(B17-365,"mmm-yy")
    Anyway, to avoid hard coded 365 or 366 days per year, use
    =TEXT(EDATE(B17,-12),"mmm-yy")

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    50,434

    Re: Drop Down list showing current month & year and formula to show Prev Year

    Change teh formula in C17 ti this...
    =LEFT(B17,4)&RIGHT(B17,2)-1

    Feb-20 is not a real date, it is just text. 1 Feb 20 would be a real date
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2016
    Posts
    1,195

    Re: Drop Down list showing current month & year and formula to show Prev Year

    Thanks for the help & input, much appreciated

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    50,434

    Re: Drop Down list showing current month & year and formula to show Prev Year

    Happy to help, thanks for the feedback

+ 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. Replies: 4
    Last Post: 10-07-2018, 04:35 PM
  2. [SOLVED] Drop down list gives data per year and month
    By EXCELBENCH in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-06-2018, 02:19 PM
  3. [SOLVED] How to get month and year of previous and current financial year?
    By mso3 in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 04-11-2017, 05:19 AM
  4. [SOLVED] Current year and month and Previous and year
    By Anjukeerthi in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-24-2014, 01:23 AM
  5. Change year but keep the month the same based on current year
    By Jamon Fries in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-11-2014, 05:29 PM
  6. Replies: 3
    Last Post: 09-04-2013, 10:49 AM
  7. Current Year & Month Name, Previous Year & Month Name
    By mithesh in forum Excel General
    Replies: 9
    Last Post: 10-21-2011, 07:00 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