+ Reply to Thread
Results 1 to 5 of 5

Need Macro to get data for last 3 months, 6 months, 12 months etc

  1. #1
    Registered User
    Join Date
    02-11-2016
    Location
    India
    MS-Off Ver
    2013
    Posts
    2

    Need Macro to get data for last 3 months, 6 months, 12 months etc

    Hi,

    I need macro which, on selection will show data for last 1 month, 3 months, 6 months and 12 months. It would be great if we have buttons for 1 month, 3 months, 6 months and 12 months, clicking on which it will only show data for that particular period. I also need a button which would say something like "Show All" data, clicking on which it will show all data again.

    Attached is a sample sheet.

    Thanks a lot in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Need Macro to get data for last 3 months, 6 months, 12 months etc

    Give this a shot - the user can select the number of months to go back or enter "all" to show all the months. You can tie it to a button or hotkey if that's your preference.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Need Macro to get data for last 3 months, 6 months, 12 months etc

    Another:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-11-2016
    Location
    India
    MS-Off Ver
    2013
    Posts
    2

    Re: Need Macro to get data for last 3 months, 6 months, 12 months etc

    Thanks cantosh and JOHN H. DAVIS. It worked.

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Need Macro to get data for last 3 months, 6 months, 12 months etc

    You're welcome. Glad to help out and thanks for the feedback. Please mark this thread as SOLVED.

+ 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: 2
    Last Post: 07-22-2014, 02:15 AM
  2. Replies: 2
    Last Post: 03-19-2014, 07:26 PM
  3. Replies: 8
    Last Post: 02-20-2014, 05:46 PM
  4. Using index to return data from list for last 12 months or months available
    By welchs101 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-23-2013, 09:44 AM
  5. [SOLVED] Display cells 12 months prior and 12 months post from a given date
    By hog77 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-20-2012, 06:25 AM
  6. Replies: 0
    Last Post: 04-13-2012, 03:10 AM
  7. [SOLVED] Average - 3 months / 6 months trend line ( array formula? )
    By ccernat in forum Excel General
    Replies: 3
    Last Post: 04-04-2012, 06:24 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