Insert Date in Next Column When Entering Data

DonAckerman

New Member
Joined
Nov 1, 2017
Messages
7
I'm a newbie trying something that might be simple.

When I type data in column B, I'd like column C to automatically fill in today's date.

That's it. It has to be easy, but I haven't figured it out. Thanks in advance for the help!
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
something along the lines of

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 2 Then
Target.Offset(0, 1) = Time
End If

End Sub
 
Upvote 0
Welcome to the Board!

Note: Be sure to paste the code Steve provided above in the proper Sheet VBA module.
An easy way to get there is to right-click on the sheet tab name at the bottom of the screen, select "View Code", and paste into the resulting VBA window.
 
Upvote 0
When I run the above, I get "Run-time error '424': Object required"
I'm brand new at this so appreciate the help as I learn.
 
Upvote 0
That helps, Joe4! I am new so this is awkward and slow.

I did change "Time" to "Date" and used your tip. That's working thus far.
 
Upvote 0

Forum statistics

Threads
1,224,550
Messages
6,179,459
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top