Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Illinois
    Posts
    552
    Thanks
    0
    Thanked 1 Time in 1 Post

    Function to recognize numbers (excel xp)

    Is there an excel function that will check if a cell has a number but excludes dates? ISNUMBER(A1) returns TRUE if A1 has a date, and I don

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Function to recognize numbers (excel xp)

    Hi jha,

    Check out the CELL function. Depending on what you're trying to achieve, you might need the TYPE function as well.

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Function to recognize numbers (excel xp)

    The only thing that differentiates a "date" from another number is the format.

    In VB you could use Isdate function.

    Steve

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Function to recognize numbers (excel xp)

    To follow up on Steve's suggestion, the following UDF might help :<pre>Function IsNonDateNumber(rngCell) As Boolean
    IsNonDateNumber = IsNumeric(rngCell) And Not IsDate(rngCell)
    End Function</pre>

    This will return TRUE for any numeric data that is NOT formatted as a date.

    Andrew C

Posting Permissions

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