+ Reply to Thread
Results 1 to 5 of 5

vba to add year to a cell, then be able to increase or decrease year to suite need

  1. #1
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    vba to add year to a cell, then be able to increase or decrease year to suite need

    I have a range of cells, O10:O24 which I would like to be able to enter the year in, then be able to adjust this by doubleclicking and rightclicking the mouse. These three vba's work, but is there a better way to do this? Thanks!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: vba to add year to a cell, then be able to increase or decrease year to suite need

    It is not necessarily better, the only other thing I could think of would be to use spin buttons

  3. #3
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Re: vba to add year to a cell, then be able to increase or decrease year to suite need

    Thanks stnkynts, cough, cough (joking). I am now thinking of just using doubleclick to insert the date and rightclick to reduce it. Is there a way to do this so that it enters this year plus 10? I tried "now + 10", but it gave me the time and this year in the cell. I don't really want to have to go back to the macro every year to add one.

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: vba to add year to a cell, then be able to increase or decrease year to suite need

    This is how you would enter this year plus 10 years upon double clicking a cell.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Re: vba to add year to a cell, then be able to increase or decrease year to suite need

    Awesome, thanks!

+ 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. Automatically update year interval cycles from year to year
    By trumptight in forum Word Programming / VBA / Macros
    Replies: 8
    Last Post: 08-21-2014, 10:38 PM
  2. How to check if a year in a cell is a leap year
    By Azuko in forum Excel General
    Replies: 2
    Last Post: 01-31-2014, 07:08 AM
  3. Replies: 3
    Last Post: 09-04-2013, 10:49 AM
  4. Replies: 3
    Last Post: 09-18-2012, 01:01 AM
  5. Showing actual % increase year-over-year
    By Wendy Collins in forum Excel General
    Replies: 2
    Last Post: 08-01-2011, 10:08 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