Testing for Cell Content

  • I need to write an IF function to determine if the ActiveCell's content is only numerical or something else. Does anybody know how to do this quickly and efficiently?

  • Re: Testing for Cell Content


    Are you using Excel or VBA?


    Excel:
    =IF(ISNUMBER(A1),TRUE,FALSE)


    VBA:

    Code
    If IsNumeric(ActiveCell) Then
    MsgBox "True"
    Else: MsgBox "False"
    End If


    Hope this helps


    Alastair

    Einstein:
    Things should be made as simple as possible, but not any simpler


    Be sure to check out TemplateZone for all your Microsoft Office Needs.
    Get OfficeReady Professional 3.0 here!

Participate now!

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