ragnarok75
MIS
I have a spreadsheet with 12 tabs, each tab has a differnet amount of rows. I need a macro that will update a cell every time another cell is changed. The issue I have is I want this performed on 2 columns of data in each worksheet.
Example:
B2 is updated so O2 shows date of update
B100 is updated so O100 shows date of update
B6928 is updated 20 O6928 shows date of update
Everytime a cell in column B is update, I need to corresponding cell in column O (same row) updated with the current date.
I have the following code:
However, with this code I would need to repeat it for B2 until the end of the data for each sheet. Is there an easier way??
Example:
B2 is updated so O2 shows date of update
B100 is updated so O100 shows date of update
B6928 is updated 20 O6928 shows date of update
Everytime a cell in column B is update, I need to corresponding cell in column O (same row) updated with the current date.
I have the following code:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = "B$2$" Then
Target.Row
Range("O2") = Now()
Range("O2").NumberFormat = "dd-mmm-yyyy"
End If
End Sub