Convert from target worksheet to specified array

cvoltaire

New Member
Joined
Nov 22, 2013
Messages
1
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.

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]
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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