Data Validation is kind of... useless against pasting. You can try maybe doing the data validation instead with VBA? I found this and modified it some. Would need to change the range to what you want. It does not work if multiple cells are being pasted at once however and I honestly am not able to figure out how to change that or if it is possible. Put this in the sheet code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim VRange As Range, cell As Range
Dim Msg As String
Dim ValidateCode As Variant
Set VRange = Range("A1:C10")
For Each cell In Target
If Union(cell, VRange).Address = VRange.Address Then
ValidateCode = EntryIsValid(cell)
If ValidateCode = True Then
Exit Sub
Else
Application.EnableEvents = False
Application.Undo
cell.Activate
Application.EnableEvents = True
MsgBox ("Cell " & cell.Address(False, False) & ":" & ValidateCode)
End If
End If
Next cell
End Sub
Function EntryIsValid(cell) As Variant
If cell = "" Then
EntryIsValid = True
Exit Function
End If
If Not IsNumeric(cell) Then
EntryIsValid = "Non-numeric entry."
Exit Function
End If
EntryIsValid = True
End Function
Bookmarks