SamAnnElizabeth
New Member
- Joined
- Mar 15, 2013
- Messages
- 34
I'm new to writing VBA but I think I'm close to something. I want a macro that will run if a cell is changed in the range F10:F31. I want it to put in a different sheet the text of the cell address " Updated On " and the date. I think I'm close to something, but this isn't running.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target = "$F$10:$F:$31" Then
Sheets("List1").Select
Range(D1).End(xlDown).Offset(1, 0).Select
ActiveCell = Cell & " Updated On " & Date
End If
End Sub
So what I would want is that if F26 was updated, D2 would read "F26 Updated On 4/10/13". (I have a header in D1.) If F14 was changed next, D3 would read "F14 Updated On 4/10/13". I have the sub saved within the sheet where the F10:F31 is located. Any help?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target = "$F$10:$F:$31" Then
Sheets("List1").Select
Range(D1).End(xlDown).Offset(1, 0).Select
ActiveCell = Cell & " Updated On " & Date
End If
End Sub
So what I would want is that if F26 was updated, D2 would read "F26 Updated On 4/10/13". (I have a header in D1.) If F14 was changed next, D3 would read "F14 Updated On 4/10/13". I have the sub saved within the sheet where the F10:F31 is located. Any help?