Having some issues with the following:
Can't quite get this to target a specific range (Columns E-G as an array. I would like each row to be validated against one another vertically but taking into account the collective info of all three columns, not just a cell-by-cell basis.) as opposed to each individual cell in the worksheet.
Can't quite get this to target a specific range (Columns E-G as an array. I would like each row to be validated against one another vertically but taking into account the collective info of all three columns, not just a cell-by-cell basis.) as opposed to each individual cell in the worksheet.
Code:
[/COLOR]Option ExplicitPrivate Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range, vFIND As Range
Application.EnableEvents = False
For Each cell In Target
On Error Resume Next
If cell.Value <> "" Then
Set vFIND = Columns(cell.Column).Find(cell.Value, cell, LookIn:=xlValues, LookAt:=xlWhole)
If vFIND.Address <> cell.Address Then
If MsgBox("The value: '" & cell.Value & "' was found in this column in cell " & _
vFIND.Address & ", remove it?", vbYesNo, "Remove Prior Entry") = vbYes Then
vFIND.Value = ""
Else
cell.Value = ""
End If
End If
End If
Next1:
Next cell
Application.EnableEvents = True
End Sub[COLOR=#333333]