+ Reply to Thread
Results 1 to 2 of 2

Help with datestamp auto-updating

  1. #1
    Registered User
    Join Date
    02-10-2015
    Location
    Florida
    MS-Off Ver
    2010
    Posts
    4

    Help with datestamp auto-updating

    I know this has been covered extensively, but I just cannot figure this out. I have a macro to copy and insert a new line and when it is clicked all the dates update.

    If someone would be kind enough to take a look at this and offer suggestions I would greatly appreciate it. This is my current macro:

    Sub New_Delta()

    ' Go to last cell
    Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Select

    ' Copy formula from cell above
    Rows(4).Copy
    Rows(Selection.Row).Insert Shift:=xlDown

    End Sub

    2015 R&M_v2.xlsm

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Help with datestamp auto-updating

    Hi taylork65 and welcome to ExcelForum,

    It looks like all your dates are referenced to the 'current date' and probably should be stand alone.
    The following will probably do what you want:
    Please Login or Register  to view this content.
    Here are a couple of tips which may help you in the future:
    To prevent typos from ruining days and weeks of work 'Option Explicit' is NEEDED at the top of each code module. This prevents errors caused by missspellings and FORCES every variable to be DECLARED (e.g. dim i as Integer). http://www.cpearson.com/excel/DeclaringVariables.aspx

    Debugger Secrets:
    a. Press 'F8' to single step (goes into subroutines and functions).
    b. Press SHIFT 'F8' to single step OVER subroutines and functions.
    c. Press CTRL 'F8' to stop at the line where the cursor is.
    d. 'Left Click' the margin to the left of a line to set (or clear) a BREAKPOINT.
    e. Press CTRL 'G' to open the IMMEDIATE WINDOW. 'debug.print' statements send their
    output to the IMMEDIATE WINDOW.
    f. Select View > Locals to see all variables while debugging.
    g. To automatically set a BREAKPOINT at a certain location put in the line:
    'Debug.Assert False'
    h. To conditionally set a BREAKPOINT at a certain location put in lines similar to:
    if i >= 20 and xTV20 > 99.56 then
    Debug.Assert False
    endif
    i. A variable value will be displayed by putting the cursor over the variable name.

    ----------------------------------
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    Lewis

+ 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. auto-datestamp in cell based upon value in adjacent cell
    By KirstyG in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-09-2013, 04:53 AM
  2. Help with automatic chart updating/auto updating today function
    By Tux2424 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 09-26-2012, 04:45 PM
  3. [SOLVED] Datestamp in cell that never changes
    By minifreak in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-11-2012, 01:12 AM
  4. Auto list updating not updating
    By khank in forum Excel General
    Replies: 8
    Last Post: 05-28-2011, 11:03 PM
  5. [SOLVED] Datestamp
    By Pieman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-11-2006, 08:35 AM

Tags for this Thread

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