remove duplicated from only data validation

abdelfattah

Well-known Member
Joined
May 3, 2019
Messages
1,429
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
hello
I search so much in the internet how I can remove duplicated names from data validation as in my code data validation is g1
indeed I 'v found some solution but not perfect I have to filter the column f to remove duplicated but I need it I don't remove duplicated from column f b I would do that directly from data validation I no know if data validation Properties contains that
this is my code
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Columns(6)) Is Nothing Then
Dim Rng As Range
Set Rng = Range(Range("f1"), Range("f" & Rows.Count).End(xlUp))
With Range("g1").Validation
    .Delete
    .Add Type:=xlValidateList, Formula1:="=" & Rng.Address & ""
End With
End If
End Sub
 
doesn't change any thing
One possibility is that your events have become disabled. Close right out of excel then open it up again.
Remove all existing Data validation from columns I:K and then change or re-enter a value in columns F:H somewhere.
 
Upvote 0

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,214,651
Messages
6,120,738
Members
448,988
Latest member
BB_Unlv

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