Private Sub Worksheet_Change(ByVal Target As Range)
Dim x, rng As Range, last As String
On Error Resume Next
Set rng = Target.SpecialCells(xlCellTypeFormulas)
last = Application.CommandBars("Standard").Controls("&Undo").List(1)
If Not Intersect(rng, Target) Is Nothing Then
If Left(last, 5) = "Paste" Or last = "Auto Fill" Then
x = Target.Value
Application.Undo
Target.Value = x
End If
End If
End Sub