Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Sep 2001
    Location
    Blue Springs, Missouri, USA
    Posts
    108
    Thanks
    1
    Thanked 0 Times in 0 Posts

    #N/A (XL2K SR-1)

    I have a formula (=IF(ISNA(AC156),NA(),$AF$164)) in a cell that can return the #N/A error, which is fine. I want to programmatically check to see if that is what is in the cell. Activecell.Value won't work as it is not a value. Can someone point me to the correct code to programmatically check for the #N/A? Thanx in Advance.

    Dennis

    <img src=/S/gramps.gif border=0 alt=gramps width=20 height=20>

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: #N/A (XL2K SR-1)

    Hi Dennis,
    Try:
    Activecell.text = "#N/A"
    HTH
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: #N/A (XL2K SR-1)

    If that formula is in A1, then you could use:

    <pre> If Range("A1").Text = "#N/A" Then
    </pre>

    Legare Coleman

  4. #4
    2 Star Lounger
    Join Date
    Sep 2001
    Location
    Blue Springs, Missouri, USA
    Posts
    108
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: #N/A (XL2K SR-1)

    Worked like a charm!! Thanx so much.

    Dennis

    <img src=/S/gramps.gif border=0 alt=gramps width=20 height=20>

Posting Permissions

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