+ Reply to Thread
Results 1 to 7 of 7

how to Ignore formula Error Checking?

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-09-2005
    MS-Off Ver
    2003 & 2007
    Posts
    111

    how to Ignore formula Error Checking?

    I find Excel's "helpful" suggestions for fixing formulas very annoying and I turn them off. But users of my workbook may not have done that.

    My code makes changes to the sheet in a way that triggers one of Excel's suggested corrections. It says "Formula Omits Adjacent Cells." I can manually tell it to ignore the error in this cell (making the green triangle in the upper left corner disappear).

    But how can I do this in my code? I tried recording a macro but when I clicked ignore nothing was captured.

    I've also tried the following:

    MyCell.Errors(xlInconsistentFormula).Ignore = True
    This either doesn't work or I can't find the right xlErrors constant.

    Suggestions?
    Last edited by dlh; 07-18-2008 at 12:55 PM.

  2. #2
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256
    Hi dlh,

    I suggest:

    MyCell.Errors.Item(xlInconsistentFormula).Ignore = True
    Colin

  3. #3
    Forum Contributor
    Join Date
    08-09-2005
    MS-Off Ver
    2003 & 2007
    Posts
    111
    Thank you, colin_l. I've tested that and it doesn't work either.

    I think it's equivalent to the code I posted.

  4. #4
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256
    Hi dlh,

    I apologise for not reading your question closely enough.

    Revised answer:
    myCell.Errors(xlOmittedCells).Ignore = True
    Regards,
    Colin
    Last edited by Colin Legg; 07-18-2008 at 01:56 PM.

  5. #5
    Forum Contributor
    Join Date
    08-09-2005
    MS-Off Ver
    2003 & 2007
    Posts
    111
    colin_l, I really appreciate your help.

    Sorry, that's not it either.

    Enclosed is a sample workbook. Change the cell that contains "YEAR" to "2008" and the green triangle appears.
    Attached Files Attached Files

  6. #6
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256
    Strange.... I opened your workbook, changed the cell D2 to 2008 per your instruction and then the "green triangle" appeared in cell B2. Then I ran the code I supplied previously and the error disappeared as suggested....

    Sub foo()
        Dim rngCell As Range
        
        Set rngCell = Worksheets("Sheet1").Range("B2")
        rngCell.Errors(xlOmittedCells).Ignore = True
        
    End Sub
    I suppose this could feasibly be an Excel version discrepancy... I am using Excel XP.

    Colin
    Last edited by Colin Legg; 07-18-2008 at 02:07 PM.

+ Reply to Thread

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