+ Reply to Thread
Results 1 to 3 of 3

Compare two columns as a percentage

  1. #1
    Registered User
    Join Date
    08-08-2011
    Location
    Queensland, Australia
    MS-Off Ver
    Excel 2010
    Posts
    10

    Compare two columns as a percentage

    Giday all
    I have a real simple one that has kept me stumped for several hours
    Basically, I have several inspectors inspecting vehicles, and i am trying to express thier individual pass fail rate as a percentage.
    If the inspector fail more than they pass they have a negative pass rate, if they pass more than they fail they have a positive pass rate.
    The issue I have is working accross zero, ie: 1 pass and 1 fail is 50%, but take one from the other and you have zero, and a div by zero error.
    Massivly frustrating.
    I have attached the sheet and I hope someone can help out
    Thanks Darren
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: Compare two columns as a percentage

    Hi

    Try

    =IF(B2<1,"",IF(C2>0,C2/B2,IF(D2>0,D2/B2*-1)))
    --
    Regards
    Roger Govier
    Microsoft Excel MVP

  3. #3
    Registered User
    Join Date
    08-08-2011
    Location
    Queensland, Australia
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Compare two columns as a percentage

    Thanks Roger, I didnt even think of multiple if statement, works exactly as I need. Thanks again

+ 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