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

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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