Answers for "check if character is in sting vba"

VBA
6

excel vba check if a string only contains letters

'VBA function to test if a string contains only letters:

Function IsAlpha(s) As Boolean
    IsAlpha = Len(s) And Not s Like "*[!a-zA-Z]*"
End Function
Posted by: Guest on August-23-2020
-1

VBA check if a cell contains a letter or string

Sub IfContains()
    If InStr(ActiveCell.Value, "string") > 0 Then
        MsgBox "The string contains the value."
    Else
        MsgBox "The string doesn't contain the value."
    End If
End Sub
Posted by: Guest on October-09-2020

Code answers related to "check if character is in sting vba"

Code answers related to "VBA"

Browse Popular Code Answers by Language