Tuesday, August 5, 2014

UDF to Check Cell is having Validation or not

UDF To Check Cell is having validation or not:

Function is_validation(rng As Range) As Boolean
    Dim i
    On Error Resume Next
    i = rng.Validation.Type
    On Error GoTo 0
    If i = 3 Then
        is_validation = True
        is_validation = False
    End If
End Function

Use it like =is_validation(D3)

No comments:

Post a Comment

Import data from SQL

Macro to import data from SQL using ADO connection string: Sub Import_data_from_SQL() ' Tools -> References -> Microsoft Active...