Dim WsVariantNC As Worksheet
Dim data_range As Range
Dim invalid_cell As Range
Dim nr_invalid As Integer: nr_invalid = 0
Set WsVariantNC = Worksheets("Variant_Module_Incompatibility")
WsVariantNC.Activate
Set data_range = WsVariantNC.Range("A1:K10000")
' Loop through each cell that has data validation and gets the number of invalid cells
For Each invalid_cell In data_range
If Not invalid_cell.Validation.Value Then
nr_invalid = nr_invalid + 1
If nr_invalid <> 0 Then
MsgBox "Invalid Data has been found, it will be surrounded in red. Please correct them"...