+ Reply to Thread
Results 1 to 3 of 3

IfError then change cell values, and then change them back

  1. #1
    Registered User
    Join Date
    06-09-2009
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    17

    IfError then change cell values, and then change them back

    I occasionally get a #VALUE! or #DIV/O! errors all over the place in a workbook.

    I know that if I then change a particular cell's value, and change it back, all of the errors go away, and yet I cannot understand how to get rid of the error. For example it will be a #DIV/0! error but every cell and its antecedents having the error does not contain any division by zero.

    So I can't seem to prevent the error from coming, but know how to fix it when it does (strange, i know). Recognizing that, what I am wondering is if there is a way using VBA to say:




    (1) IF range contains an error then set all cell values in range equal to 0.

    (2) Then switch all the cell values in range back to what they were before.





    I could really use some help on this...

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: IfError then change cell values, and then change them back

    there MUST must be something causing it !
    have you got an example that will fail on demand?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    06-09-2009
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: IfError then change cell values, and then change them back

    I'll try to reproduce the error on-demand. Good advice.

+ 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