Results 1 to 11 of 11

Using the function ISNA in a macro

Threaded View

  1. #1
    Registered User
    Join Date
    11-30-2007
    Location
    Edinburgh, UK
    MS-Off Ver
    2003
    Posts
    84

    Using the function ISNA in a macro

    Hi,

    Hoping someone will be able to help me out.

    I've got a macro which basically reformats data from another source.

    It then places all the data on a new sheet. My problem is that some of the formula that the macro places on the new sheet come back with the result #N/A - which is fine, as they are the result of a lookup.

    What I want to try and do, is at the end of the macro, get it to delete the row if the activecell is showing as #N/A

    I've tried to write a small bit of code for it...


    Do
    If ActiveCell.Value = "ISNA"
    Rows(ActiveCell.Row).Columns("A:M").Select
    Selection.Delete
    ActiveCell.Offset(1, 0).Select
    Else
    ActiveCell.Offset(1, 0).Select
    End If

    Loop While ActiveCell.Value <> "0"
    The code does not seem to like 'ISNA' or '#N/A'. Any ideas on how I can get past this?

    Cheers
    Last edited by hriggs; 11-04-2008 at 11:42 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1