Populate Date on Total Change

sscornav

Board Regular
Joined
Mar 20, 2010
Messages
125
I have the following spreadsheet. Users are allowed to update the yellow colored fields with their forecast. If the total changes (column E), I want to update column F with the current date/time and column G with the user name.

I could use some help with the macro. Thanks!

Excel Workbook
ABCDEFG
11Q2Q3Q4QTotalDate ChangedUser Name
210.0022.0035.0050.00117.00
315.0055.0020.0050.00140.00
475.0060.0040.0040.00215.00
545.0025.0025.0090.00185.00
Sheet1
 
Clarification: Where would be the most efficient place to unprotect in the new macro that updates the date and user?
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Try:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim Cell As Range
    If Intersect(Target, Range("A2:D5")) Is Nothing Then Exit Sub
    With Application
        .EnableEvents = False
        .ScreenUpdating = False
        Me.Unprotect "pmo"
        For Each Cell In Target
            Range("F" & Cell.Row) = Format(Now, "mm/dd/yyyy hh:mm:ss AM/PM")
            Range("G" & Cell.Row) = Environ("username")
        Next Cell
        Me.Protect "pmo"
        .EnableEvents = True
        .ScreenUpdating = True
    End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,289
Members
452,902
Latest member
Knuddeluff

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