Results 1 to 5 of 5

?CVErr(xlErrDiv0)

Threaded View

  1. #1
    Forum Contributor
    Join Date
    06-29-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    122

    ?CVErr(xlErrDiv0)

    The following code makes me nervous as I don't know how it works (it does 'seem' to work).

    In Cell U6 in Sheet calculator I wand to replace any Div 0 error with 0 itself.

    Looking for insight on how the bold line below works:

    Also there is only one End If !?

     Worksheets("Calculator").Range("U6").Value = "=J6/G6"
     Worksheets("Calculator").Select
    
     If IsError(Range("U6")) Then
    
      If Range("U6").Value = CVErr(xlErrDiv0) Then Range("U6").Value = 0
    
     End If
    Last edited by intothewild; 06-09-2014 at 02:17 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. CVerr function as workaround for "ondelete"
    By cadas in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-11-2009, 06:55 AM
  2. Type Mismatch with CVErr loop
    By JFamilo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-15-2005, 10:48 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