Jump to content


Excel 2007


2 replies to this topic

#1 b00g3R

    Young Padawan

  • Members
  • Pip
  • 81 posts
  • Gender:Male
  • Location:Chicago, IL, USA

Posted 12 March 2008 - 02:42 PM

Basically, I want to know if there is a formula for an up-to-date fuction?
Meaning, if I have say C4 filled with text and I decided to change it, I want C5 to give me the last time it was changed aka up-to-date..

Ex. I input a text saying John into C4 at 1:00pm. I want C5 to say Last updated at 1:00 <date>.
At 2:20pm the next day I input John Doe into C4. Now C5 now says "Last updated at 2:00pm on <date>


Is there a way of doing that?

#2 Vandalised

    Jedi In Training

  • Members
  • PipPip
  • 307 posts
  • Gender:Male
  • Location:UK
  • Interests:Most sports, football, cricket, hockey, tennis, golf. Web design, graphic design (photoshop) Socialising with friends, going to clubs, bars, concerts.

Posted 12 March 2008 - 03:04 PM

Ok I found the following code that should work:

Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("A1:A1")) Is Nothing Then
        Target(1, 2) = Date
        Target(1, 3) = Time
        Target(1, 2).EntireColumn.AutoFit
    End If
End Sub

To use this, right click the sheet you wish to have this information displayed on and then click view code. Then paste the above code into the nice white blank worksheet, save, then edit cell A1.

Note: This does not show the text "Last modified" then the date and time it just simply shows the date and time. Also note that you can edit the range of cells you wish to use, I have just selected cell A1 as it is an example.

Edited by Vandalised, 12 March 2008 - 03:05 PM.


#3 b00g3R

    Young Padawan

  • Members
  • Pip
  • 81 posts
  • Gender:Male
  • Location:Chicago, IL, USA

Posted 12 March 2008 - 04:07 PM

Alright, I'll have to take a look at that and try it out.
I unfortunatly not to advanced in Excel, but I do see what your talking about.
I just thought I was able to do it as a formula or something inside the worksheet.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users