Determine Data Type Function

  • I want to use Type to find the value in cell A12, with an IF statement. I need something like "If Type (A12)= 1 Then"...etc. What is the syntax for this ?

  • If you are wanting to use a formula, you can use

    For a coding way

    If IsNumeric(Range("A1")) = True Then
        If Range("A1") = 1 Then
            'Do Something here
            'do something else
        End If
    MsgBox "Not A Valid Number"
    End If

    Is This what you are looking for? Usually Type refers to some type of control, so I do not know if you have a control on the sheet and you are trying to determine what type of control it is.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!