I have cross-posted this at https://stackoverflow.com/questions/...lidation-lists and on https://www.mrexcel.com/forum/excel-...ion-lists.html
I am trying to loop through 2 pairs of data validation lists, 4 data validation drop downs in total.
With every loop of the data validation lists I would like to count the number of occurrences of two symbols and
then save the result of each loop in a variable or a worksheet or both.
I have found a bit of code that I think could be a starting point to work from.
Sub dataValidationAllSheet()
Dim sh As Worksheet
Dim cell As Range
' Loop through all sheets
For Each sh In ThisWorkbook.Worksheets
'Loop through all cells with validation
For Each cell In sh.Cells.SpecialCells(xlCellTypeAllValidation)
'Print cell address, validation type and cell parent name to immediate window
Debug.Print cell.Address & vbTab & cell.Validation.Type & vbTab & cell.Parent.Name
Next cell
Next sh
End Sub
Bookmarks