Timestamp in 3 seperate columns

ecxc4

New Member
Joined
Jul 13, 2006
Messages
11
I have been able to use a timestamp in 2 different columns corresponding to the column next to it. But I would like to add a third column, the range will not allow another column to be added.

using this code :


Private Sub Worksheet_Change(ByVal Target As Range)
Dim keyRange As Range
Set keyRange = Range("b13:b65536", "d13:d65336")
Application.EnableEvents = False
If Not Intersect(keyRange, Target) Is Nothing Then
If Target <> "" Then
Target.Offset(0, -1) = Now
Else
Target.Offset(0, -1) = ""
End If
End If
Application.EnableEvents = True
End Sub



any help would be greatly appreciated
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,286
Office Version
  1. 365
Platform
  1. Windows
Try this.
Code:
Set keyRange = Union(Range("b13:b65536"), Range("d13:d65336"), Range("F13:F65336"))
 

Watch MrExcel Video

Forum statistics

Threads
1,130,444
Messages
5,642,187
Members
417,259
Latest member
gtacw

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
Top