Excel to record all changes on refresh

OregonUnknown

New Member
Joined
May 28, 2019
Messages
1
I am NOT the greatest in Excel or VBA. In fact until the last week, I never used VBA, but am learning a lot from Forums and instructional videos. I appreciate everyone of you who participate in these forums and help out those of us who, at times, are utterly and completely lost!

I need to select random employees for drug and alcohol testing.
I created a sheet that allows me to input employee names, employee numbers, and their position into an "employee listing" and then assign a random number to that individual. I then added a button that will "refresh and reassign" the random numbers assigned to each participant and select, at random, "x" amount of people for Drug and/or Alcohol testing which is dependent on the current or active quarter. Then a report is generated that reflects when the selections were made, who was selected and for what testing level.

My issue is that I need to record each change on a separate log in the same work book then compile each log into one.
So I need the log to record additions/deletions/changes between G4:I999 (Employee information) ---This I already have completed as it follows the "active cell"

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("D5:I99999")) Is Nothing Then​
Range("B3").Value = Target.Row​
If Range("F" & Target.Row).Value = "Cell Change" Then Log_PlaceUndoButton Else: Shapes("UndoBtn").Visible = msoFalse​
Else:​
Shapes("UndoBtn").Visible = msoFalse​
End If​
End Sub

My problem is that I then need to record the random Selections for drug testing in M04:O08 (Drug Testing Selections and Employee info)
and the random selections for Alcohol testing M15:O19 (Alcohol Testing selections and Employee info).
Both lists are populated when the "refresh" button is hit.


Any help on how to record changes after refresh?
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,214,431
Messages
6,119,462
Members
448,899
Latest member
maplemeadows

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