Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 777147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:33:26+00:00 2026-05-14T19:33:26+00:00

I am trying to have a date stamp event happen in column B when

  • 0

I am trying to have a date stamp event happen in column B when an entry is made in column A. Now i can do this in VBA with no problem, the trouble i am running into is there is also a entry that will eventually go in say column D and would need a date stamp in column E as well. is this possible. here is a sample of the code i have used so far.

Private Sub Worksheet_Change(ByVal Target As Range)
For Each Cell In Target
If Cell.Column <= 3 Then
If Cells(Cell.Row, 1) <> “” Then Cells(Cell.Row, 2) = Now
End If
Next Cell
End Sub

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T19:33:27+00:00Added an answer on May 14, 2026 at 7:33 pm

    If you’re OK with every odd column being entered by a user, and the timestamps being in the even columns (i.e. You can tyep in Column A, and the TimeStamp will go in Column B. You can type in Column C and the timestamp will go in Column D, etc.) then you can use this:

    Private Sub Worksheet_Change(ByVal Target As Range)
    
        'Only write a timestamp of an odd column changes (because the timestamps go in the even columns)
        If Target.Column Mod 2 > 0 Then
    
            'Get the first part of the address, to get the actual column being changed
            Dim columnAddress As String
            columnAddress = Target.Address
    
            If InStr(columnAddress, ":") > 0 Then
                columnAddress = Left(columnAddress, InStr(columnAddress, ":") - 1)
            End If
    
        'This will cause the TimeStamp to be undeletable (kind of like na Audit).
        'If you want the timestamp to disappear when you clear the column, uncomment the next few lines:
    
        '        If Not ActiveSheet.Range(columnAddress).Formula = "" Then
    
                ''Write the timestamp for the previous column
                ActiveSheet.Range(columnAddress).Offset(0, 1).Formula = Now
    
        '        Else
        '            ActiveSheet.Range(columnAddress).Offset(0, 1).Formula = ""
        '        End If
        End If
    
    
    End Sub
    

    You can hide columns where you don’t need the Timestamp to show.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a date picker but i m trying the manual entry from user
Hello I have been trying to format this date but it keeps giving me
I'm stuck trying to figure this one out.. We currently have a date criteria
Hi I am trying to return a collection which may potentially have null date
I am trying to have information displayed for this query: SELECT o.sub_number,o.unique_id,o.period_from,o.period_to,o.total_amt, i.paid_amt,i.dated,i.payment,i.paid_by,i.entered_date,i.paid_for_unique, j.cheque_num,j.drawn_on,j.dated
I have been trying to add to the Watch window a Java Date object
I have a variable called $effectiveDate containing the date 2012-03-26 . I am trying
I am trying to add the current date (not time if i have the
I have a really basic question concerning unix timestamp and mysql date. I'm trying
I'm trying to add a new line in front of a date stamp in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.