1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Excel - Auto date when modified

Discussion in 'Business Applications' started by bobbi, Aug 18, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. bobbi

    bobbi Thread Starter

    Joined:
    Dec 21, 2000
    Messages:
    339
    Hi

    I've searched several Excel sites, and I've found VB close to what I need, but I don't enough to make it work for me.

    I have info in rows from A to J going across. Each row has information about a certain account. When anything in that row is modified, I'd like cell K to show the date modifed automatically.

    I found a script that will do that but it only does A as the target cell and then puts the date in one cell over from the target. I need the target to be A thru J and the date cell to be K always.

    Any ideas?

    Here is the code I found on the Internet. Perhaps someone knows how to change it to do what I want.

    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    'Written by Barrie Davidson
    If Target.Column = 1 Then
    Target.Offset(0, 1).Value = Now()
    End If
    End Sub


    Thanks
     
  2. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    19,412
    Hi, this appears to do it.
    Private Sub Worksheet_Change(ByVal Target As Excel.Range)

    If Target.Column > 0 And Target.Column < 11 Then
    Target.Offset(0, 11 - Target.Column).Value = Now()
    End If
    End Sub
     
  3. bobbi

    bobbi Thread Starter

    Joined:
    Dec 21, 2000
    Messages:
    339
    Hi

    Thanks...that does work.

    Sorry I didn't thank you sooner. I never got an email that I had a reply post. Just happened to check today.

    i appreciate your help!
     
  4. witch-of-germany

    witch-of-germany

    Joined:
    Oct 14, 2007
    Messages:
    1
    Hi,

    this functionality is EXACTLY what I am looking for. However, I have never used VB before and do not know how to implement this in my spreadsheet ... Can you help me with this, please?
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/493521