Validate a cell Using ISTEXT Function

    Here i am using below mentioned functionalites to ensure whether the entered value in a cell consists of TEXT or not

     

  • ISTEXT Function
  • CHANGE - Worksheet Event
  •  

    Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False
    Dim rng As Range
    Set rng = Range("B2:H14")

    If Not Intersect(Target, rng) Is Nothing Then
    If Not Application.WorksheetFunction.IsText(Target.Value) Then
    MsgBox "This is not Text. Please enter valid Data"
    Cells(Target.Row, Target.Column).Value = "Enter Valid Data"
    End If
    End If

    Application.EnableEvents = True
    End Sub

     

    Download The Workbook