+ Reply to Thread
Results 1 to 7 of 7

Macro to cycle through dates

  1. #1
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    Macro to cycle through dates

    I want a couple of buttons on my spreadsheet that moves a date forward or back. So I have a date in cell B3, I have two arrows that I want to assign a macro to. The up arrow would move the date in cell B3 up one day and down arrow would move the date in cell B3 back on date.

    For example:
    Date in B3 is 06/25/2023

    If I click the up arrow, the date in cell B3 goes to 06/26/2023
    If I click the down arrow, the date in cell B3 goes to 06/24/2023

    The date in the cell is actually pulling data from another sheet based on a lookup, so I want to cycle through the dates on the other sheet. So my lookup looks at the date and then pulls data into other cells on the same sheet based on that date. If anything can I cycle through the column on the other sheet that contains the dates?

    What's the best way to do this? Thanks.

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Macro to cycle through dates

    Pl see yellow banner on top of this page.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  3. #3
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,719

    Re: Macro to cycle through dates

    Like so?
    2 Small Buttons, one with a + and the other with a -
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    The inherent weakness of the liberal society: a too rosy view of humanity.

  4. #4
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    Re: Macro to cycle through dates

    Awsome, thanks Jolivanes, that works perfectly!

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,913

    Re: Macro to cycle through dates

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  6. #6
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    Re: Macro to cycle through dates

    Quote Originally Posted by alansidman View Post
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    I did both, thanks!

  7. #7
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,719

    Re: Macro to cycle through dates

    Thanks for that and good luck.

+ 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] Count number of records raised on a recurring 2 week cycle using dates
    By Redders15 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-11-2022, 09:14 AM
  2. Assigning cycle number to each repeating cycle based on flow condtion
    By mschiefmanaged in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-18-2021, 06:14 PM
  3. cycle through dates
    By dwnhiler in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-14-2021, 03:54 AM
  4. Replies: 0
    Last Post: 02-09-2017, 07:56 PM
  5. Average Cycle Time for a Series of Dates
    By gjdcrew in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-07-2014, 10:12 AM
  6. Replies: 19
    Last Post: 09-16-2009, 07:22 PM
  7. Replies: 15
    Last Post: 09-16-2009, 12:02 PM

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