+ Reply to Thread
Results 1 to 3 of 3

Worksheet_Change - Division by 0 (#DIV/0!) error - how to avoid

  1. #1
    Registered User
    Join Date
    11-15-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    25

    Worksheet_Change - Division by 0 (#DIV/0!) error - how to avoid

    I have the following code for three cells B2,B3,B4 which are all dependent on eachother.

    The problem is when B2 is 0 I get a Division by 0 error. How I can I avoid the error?

    Any help would be much appreciated.

    -Dre

    Please Login or Register  to view this content.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Worksheet_Change - Division by 0 (#DIV/0!) error - how to avoid

    Please Login or Register  to view this content.
    Change the part in red to be the result you want when B2 is zero.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    11-15-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Worksheet_Change - Division by 0 (#DIV/0!) error - how to avoid

    Works great. Thanks a lot.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Why Division by Zero error?
    By amarus99 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-01-2012, 03:18 PM
  2. [SOLVED] How to avoid #DIVISION/0! in result
    By soli004 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-04-2012, 08:07 AM
  3. Replies: 1
    Last Post: 04-30-2012, 12:07 PM
  4. Error values:DIV/0! error in SumProduct formula with no division
    By Jerry W. Lewis in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 PM
  5. VBA Error-Division By Zero
    By mully in forum Excel General
    Replies: 4
    Last Post: 08-17-2005, 03:05 AM

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