Visual basic code for auto generation of time

Asked By 10 points N/A Posted on -
qa-featured

Hello Techyv Friends,

I am in need of visual basic code for auto generation of time and date based on the updating of a cell in Excel. 

Please do the needful for providing the same. 

Example: If I update the cell A1, the date and time of updating needed to be automatically updated into cell B1.

SHARE
Answered By 15 points N/A #165299

Visual basic code for auto generation of time

qa-featured

The most straight and simple solution for this is to attach a few lines of VBA code to the worksheet you want this functionality to.

To add date and time automatically added to cell 'B1:100' for changes in 'A1:100':

  • Right click on the sheet tab, you want to do this
  • Select 'View source' option
  • Write a macro. You can either use the code from Add date/time to cell upon entry automatically, which explains add date time automatically, or write some custom code based on it

Related Questions