Consulting

Results 1 to 2 of 2

Thread: Solved: Excel 2003 - Need to determine if any text has been entered into a numbers only cell

  1. #1
    VBAX Expert
    Joined
    Sep 2010
    Posts
    604
    Location

    Solved: Excel 2003 - Need to determine if any text has been entered into a numbers only cell

    I Need to determine if any text has been entered into a numbers only cell.

    I know this can be done with cell validation, but in this case I need to do it using VBA.

    Thanks

  2. #2
    VBAX Expert
    Joined
    Sep 2010
    Posts
    604
    Location
    Thanks for your time - I Got it figured out
    [vba]Dim BoolVal As Boolean
    BoolVal = IsNumeric(ActiveCell.Offset(0, 9 - ActiveCell.Column).Value)
    If BoolVal = False Then
    MsgBox "Only a numeric value can be entered into Column 9"
    Exit Sub
    End If[/vba]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •