Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #21  
Old 12-03-2019, 02:07 PM
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 NoSparks View Post
Are you trying to use that code for the sheet pictured in post #16, where the dates are in column G ?
I've moved things around. Attached is a screenshot of the current working version. Target column is now E and first cell is E6 (right now it doesn't seem to work anymore--no runtime error or anything just doesn't seem to process. I have macros enabled).


Code:
Sub UpdateIntakeDate()
    Dim rng As Range, cel As Range, lr As Long
With Sheets("Client Tracker")
    lr = .Cells(.Rows.Count, "E").End(xlUp).Row
    If lr < 12 Then Exit Sub
    Set rng = .Range("E6:E" & lr)
    For Each cel In rng
        If cel <> "" Then
            If Date >= DateAdd("yyyy", 1, cel) Then
               cel = DateSerial(Year(Date), Month(cel.Value), Day(cel.Value))
            End If
        End If
    Next cel
End With
End Sub
Attached Images
File Type: png tracker ss updated.png (33.3 KB, 11 views)
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:49 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