+ Reply to Thread
Results 1 to 6 of 6

Display the date and time each time the data in a cell range is changed

  1. #1
    Registered User
    Join Date
    08-22-2012
    Location
    Namibia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Display the date and time each time the data in a cell range is changed

    I'm not familiar with macro's, but found one which accomplishes to change the date and time each time a cell in a column range is changed.

    UDF:
    Please Login or Register  to view this content.
    Formula above range:
    =UDF_Date(H7:H25)

    Example:
    H4 23/08/2012 09:00

    H7 12
    H8 40
    ...
    ...
    H25 15

    If any entry is made in cells H7 - H25, the date and time should be logged in cell H4.

    However, when I open the excel sheet and enable macros it automatically changes the date and time to the date time the sheet is accessed. This also happens when I send the sheet via e-mail and the person on the other side opens it.

    How can I correct this and embed the date with it only changing if one of the cells in the range changes?

    Thank you
    Last edited by Cutter; 08-24-2012 at 12:31 PM. Reason: Added code tags

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Display the date and time each time the data in a cell range is changed

    Hi, BVZM,

    WorksheetFunction Now() will be updated on any calculation the workbook/worksheet does. Maybe have a look at Stephen Bullenīs Homepage and download LastChng.zip which is a workbook showing one way of reaching the desired result using circular references.

    BTW: I wouldnīt use a Function but use the Worksheet_Change-Event to put in Date and Time.

    Ciao,
    Holger

  3. #3
    Registered User
    Join Date
    08-22-2012
    Location
    Namibia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Display the date and time each time the data in a cell range is changed

    Thank you Holger, will give that a try.

    Regards
    Beana

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Display the date and time each time the data in a cell range is changed

    Hi, Beana,

    if the entries are made manually this code goes behind the worksheet:

    Please Login or Register  to view this content.
    Ciao,
    Holger

  5. #5
    Registered User
    Join Date
    08-22-2012
    Location
    Namibia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Display the date and time each time the data in a cell range is changed

    Thanks Holger,
    I would really like if there is a simple way to accomplish this. Please see attached image for that I'm trying to do Example.jpg

    I tried to copy and paste the code above in vba on 'this worksheet', saved and returned to Excel. Not sure if I did the correct thing, but nothing changed on the sheet. Like I said, I'm not familiar with macros, to be honest...at all.

    Regards

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Display the date and time each time the data in a cell range is changed

    Hi, BVZM,

    I would have preferred a workbook over a picture, especially since you claim not to be that good with macros/VBA. If I see it correctly this should affect columns H, I, K, and M indepently? Or is it only column H like in your starting post?

    Ciao,
    Holger

    Don't forget to mark thread as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [ code ] Your code here [ /code ] (without the spaces inside the brackets)

+ Reply to Thread

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