VBA NOW() Time Stamp - Multiple Columns

Greenies08

New Member
Joined
Apr 4, 2011
Messages
22
I thought it might be easy to add additional columns to the VBA so every other column produced a time stamp, can someone help please?


Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Columns("j:j, l:l, m:m, o:eek:")) Is Nothing Then
For Each i In Intersect(Target, Columns("j:j, l:l, m:m, o:eek:"))
If Not IsEmpty(i) Then
i.Offset(0, 1).Value = Now
Else
i.Offset(0, 1).ClearContents
End If
Next i
End If
End Sub
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Instead of:
Code:
[COLOR=#333333]Columns("j:j, l:l, m:m, o:o")[/COLOR]
you need to use:
Code:
[COLOR=#333333]Range("j:j, l:l, m:m, o:o")[/COLOR]

Also, note that there seems to be a typo in your range. L and M are consecutive columns, not "every other".
So, updating column L will update column M, which then in turn will update column N!
 
Upvote 0

Forum statistics

Threads
1,215,302
Messages
6,124,148
Members
449,146
Latest member
el_gazar

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