What I want to do is to loop the data validation and when I find a match, select the data validation option. Below my code:
Explicit option Sub Insert () Dim LastRow as long, I have as long Dim str As String Dim rng As Range, optional range With ThisWorkbook.Worksheets ("Sheet1") LastRow = .Cells (.Rows.Count, "A"). End (xlUp) .Row For i = 1 at LastRow str = .Range ("A" & i) .Value Set rng = Evaluate (.Range ("B" & i) .Validation.Formula1) For each opt in rng If Opt.Value = str Then Opt.Select End if following Then I Finish by End Sub
I receive a Runtime error & # 39; 424 & # 39; online:
Set rng = Evaluate (.Range ("B" & i) .Validation.Formula1)
Any help will be appreciated!