excel - Auto-fill the date in a cell, when the user enters information in an adjacent cell -



excel - Auto-fill the date in a cell, when the user enters information in an adjacent cell -

i have spread sheet, people can come in project updates , date of update. happening people forgetting date notes. there way have date cell autopoplute current/date of entry?

i assuming if function it?

this event macro place date in column b if value entered in column a. macro should installed in worksheet code area:

private sub worksheet_change(byval target range) dim range, b range, inte range, r range set = range("a:a") set inte = intersect(a, target) if inte nil exit sub application.enableevents = false each r in inte r.offset(0, 1).value = date next r application.enableevents = true end sub

because worksheet code, easy install , automatic use:

right-click tab name near bottom of excel window select view code - brings vbe window paste stuff in , close vbe window

if have concerns, first seek on trial worksheet.

if save workbook, macro saved it. if using version of excel later 2003, must save file .xlsm rather .xlsx

to remove macro:

bring vbe windows above clear code out close vbe window

to larn more macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

and

http://msdn.microsoft.com/en-us/library/ee814735(v=office.14).aspx

to larn more event macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm

macros must enabled work!

change code utilize different columns.

edit#1:

this version not overwrite material nowadays in column b:

private sub worksheet_change(byval target range) dim range, b range, inte range, r range set = range("a:a") set inte = intersect(a, target) if inte nil exit sub application.enableevents = false each r in inte if r.offset(0, 1).value = "" r.offset(0, 1).value = date end if next r application.enableevents = true end sub

excel date auto-populate

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -