+ Reply to Thread
Results 1 to 8 of 8

DIV error

  1. #1
    Registered User
    Join Date
    03-18-2020
    Location
    Newcastle upon Tyne, England
    MS-Off Ver
    Microsoft Office 365
    Posts
    5

    DIV error

    Hi,

    This is my first forum post.

    I am trying to divide values in 2 cells to show the % difference in another. However if the base value is 0 I get the DIV error and if the % difference is 100% I get the DIV error. See sample of workbook for my issue:

    sample workbook.xlsx

    Any help would be really appreciated.

    Scott
    Attached Images Attached Images
    Last edited by Scottbell1234; 03-18-2020 at 09:54 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: DIV error

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    03-18-2020
    Location
    Newcastle upon Tyne, England
    MS-Off Ver
    Microsoft Office 365
    Posts
    5

    Re: DIV error

    I am dividing "Q1 actual vs forecasted/Quarter 1".

    Ideally I would like a 0% or 100%

  4. #4
    Registered User
    Join Date
    03-18-2020
    Location
    Newcastle upon Tyne, England
    MS-Off Ver
    Microsoft Office 365
    Posts
    5

    Re: DIV error

    I have attached a sample workbook.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: DIV error

    change your formula to =IFERROR(C2/A2,0) and copy down.

  6. #6
    Registered User
    Join Date
    03-18-2020
    Location
    Newcastle upon Tyne, England
    MS-Off Ver
    Microsoft Office 365
    Posts
    5

    Re: DIV error

    Hi,

    Thanks for getting back so quick. It works to a certain degree. However when there has been a 100% increase this still shows as 0%.

    For example if you look at row 6 there has been a 100% increase but this shows as 0%.

  7. #7
    Registered User
    Join Date
    03-11-2020
    Location
    Philippines
    MS-Off Ver
    2016
    Posts
    4

    Re: DIV error

    technicaly I think row 6 should result in 0% since A6 is 0, but if you want it to return 100%, you can use the formula below.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    03-18-2020
    Location
    Newcastle upon Tyne, England
    MS-Off Ver
    Microsoft Office 365
    Posts
    5

    Re: DIV error

    Wow, excellent. I was trying the IF and AND commands but couldn't get it to work.

    Thanks so much

+ 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. [SOLVED] Odd Error Handling Behaviour; goes to error handler even when no error?
    By kalikj in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-04-2018, 10:04 AM
  2. [SOLVED] Run-tim error -2147467259(80004005): Automation error Unspecidied error
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2014, 12:12 PM
  3. Excel macro (compile error. syntax error.) error
    By salar_younis in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2014, 06:11 AM
  4. Receiving following error “Complie error : syntax error” Help
    By masond3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-02-2012, 10:19 AM
  5. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 AM
  6. Error 75 File/Path access error, sometimes Error 1004
    By smokebreak in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-16-2011, 02:35 PM
  7. [SOLVED] Error Handling - On Error GoTo doesn't trap error successfully
    By David in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-16-2006, 02:10 PM

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