Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 11-30-2019, 08:17 AM
PrincessApril PrincessApril is offline Automatically update user-inputted date after specified time range Windows 10 Automatically update user-inputted date after specified time range Office 2019
Competent Performer
Automatically update user-inputted date after specified time range
 
Join Date: Nov 2019
Posts: 102
PrincessApril is on a distinguished road
Default

Quote:
Originally Posted by ArviLaanemets View Post
No formula can refer to same cell where it is. So yes, in case you want to overwrite the value without storing original one somewhere, then VBA is only solution.

When you want really to do this, then consider a procedure which is run manually or is called by open event of workbook at start of every year. When you use e.g. workseet change event, then the code is run every time you edit anything in any cell on worksheet. This may slow your workbook down considerably!
That's a good point. I thought it would be possible to run a macro a single time when opening the worksheet.

Quote:
Or user simply enters formula instead of date into cell. Something like
Code:
=DATE(YEAR(TODAY(),10,22)
I am actually using that formula elsewhere in the sheet. It is great for many purposes, but it will not work here. Take the example above of June 7. This formula would change June 7, 2019, to June 7, 2020, as soon as today's date hits January 1, 2020. That means the user loses half a year of reminders for their work. Although we do have some dates based on the calendar year (and I handle those with other formulas in my worksheet), several of our reminders are not dependent on the calendar year but on a 12-month cycle that begins with the intake date, which could be any date during the year.

Updating the year in the target cell is a way of allowing the user to continue using the worksheet the next year without having to manually update the dates. As an alternative, I could turn the cell red when the year has passed so that the user knows to manually update, but feedback in my department is that they would like the dates to update automatically.
Reply With Quote
 

Tags
automatically, update, year



Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically update user-inputted date after specified time range Auto update excel graph range, ignore data when date reads 00-Month-00 SavGDK Excel 2 06-24-2016 08:05 AM
Automatically update user-inputted date after specified time range Auto populating dates on timesheet for week from one inputted date ohi Word VBA 3 12-04-2014 12:11 PM
Date/Time Formula for Entry level XL user talon1driver Excel 2 09-18-2014 02:32 PM
Mail merge with filter using data inputted by user Tornado70 Mail Merge 6 04-09-2013 07:16 AM
Automatically update user-inputted date after specified time range How to update automatically the “file name” as we do for the “Date”? Jamal NUMAN Word 2 01-06-2011 02:43 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:06 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft