Results 1 to 9 of 9

Multiple iteration of a date stamp

Threaded View

  1. #1
    Registered User
    Join Date
    05-15-2013
    Location
    Stoke on Trent
    MS-Off Ver
    Excel 2003
    Posts
    2

    Multiple iteration of a date stamp

    Hi

    Can comeone please help? I have the below code to date stamp a cell in column AN only when a cell in column AB equals 0...the trouble is I would like this to work for the entire column without having to keep copy and pasting the code like I have below.

    Also if there is any other number in column AB i want it to skip that row, not date stamp in column AB but move to the next row down?? Lastly, once the date stamp is in the relevant cell in column AN I never want it to overtype,

    Any help would be greatly appreciated


    I am currently using:

    Private Sub Worksheet_Change(ByVal Target As Range)
    
    Sheets("Performance Board").Unprotect "password"
    
    If Intersect(Target, Range("AB8")) = 0 Then
    If Range("AN8").Value <> "" Then Exit Sub
    Application.EnableEvents = False
        Range("AN8").Value = Now
        Range("AN8").NumberFormat = "d dddd yyyy  hh:mm:ss"
    Application.EnableEvents = True
    End If
    
    If Intersect(Target, Range("AB9")) = 0 Then
    If Range("AN9").Value <> "" Then Exit Sub
    Application.EnableEvents = False
        Range("AN9").Value = Now
        Range("AN9").NumberFormat = "d dddd yyyy  hh:mm:ss"
    Application.EnableEvents = True
    End If
    
    If Intersect(Target, Range("AB10")) = 0 Then
    If Range("AN10").Value <> "" Then Exit Sub
    Application.EnableEvents = False
        Range("AN10").Value = Now
        Range("AN10").NumberFormat = "d dddd yyyy  hh:mm:ss"
    Application.EnableEvents = True
    End If
    
    Sheets("Performance Board").Protect "password"
    
    End Sub
    Last edited by Leith Ross; 05-16-2013 at 01:43 PM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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