+ Reply to Thread
Results 1 to 5 of 5

#DIV/0! error:ome of the cells don't have data

  1. #1
    Registered User
    Join Date
    08-14-2006
    Posts
    32

    #DIV/0! error:ome of the cells don't have data

    I want to use the following formula, however i keep getting a #DIV/0! error. I know this is because some of the cells don't have data, but is there away to avoid the #DIV/0! error when cells have no data in them?

    =(R12/C12)+(S12/A$3)+((I12*Q12)/60)+(T12/H12)

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    re: #DIV/0! error:ome of the cells don't have data

    =IF(OR(C12=0;A3=0;H12=0);"Can't divide by zero";(R12/C12)+(S12/A$3)+((I12*Q12)/60)+(T12/H12))
    Last edited by zbor; 03-31-2009 at 07:14 AM. Reason: True, Q12 removed.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    re: #DIV/0! error:ome of the cells don't have data

    Or this...

    =IFERROR((R12/C12)+(S12/A$3)+((I12*Q12)/60)+(T12/H12);"Can't divide by zero")

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    re: #DIV/0! error:ome of the cells don't have data

    Hi zbor, remember that native IFERROR function is not available in versions prior to XL2007 - always best to make this point to the OP if unsure as to which version is in operation.

    In the first formula you could also remove the test of Q12 = 0 given it is only if the divisor = 0 that will generate #DIV/0!

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    re: #DIV/0! error:ome of the cells don't have data

    True about Q12... didn't look carefully...

    Here, one more way

    =IF(C12*A3*H12=0;"Can't divide by zero";(R12/C12)+(S12/A$3)+((I12*Q12)/60)+(T12/H12))

+ 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