abdelfattah
Well-known Member
- Joined
- May 3, 2019
- Messages
- 1,429
- Office Version
- 2019
- 2010
- Platform
- 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
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