+ Reply to Thread
Results 1 to 4 of 4

Countif statement not counting correctly for percentages

  1. #1
    Registered User
    Join Date
    11-06-2003
    MS-Off Ver
    2013
    Posts
    75

    Countif statement not counting correctly for percentages

    I have attached a spreadsheet where I am having difficulty counting the number of cells that =10% and =0% (they are highlighted in red). The rest of my formulas appear to be working properly. Can someone tell me what I am doing wrong with the formula in C8 & C9? There is a lot of data to try to count (about 18116 data points in one column) and I want to be able to use this for future data.

    Thanks, dcoates
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Countif statement not counting correctly for percentages

    Because, even though you are only showing the values in Column D to whole percentage points, the actual number is different (i.e. 10.2% shows as 10%). Incorporate the ROUND function into D

    In D16
    =IF($B16="","",IF($B16<=0,"error",ROUND((ABS($B16-$C16))/(($B16+$C16)/2),2)))
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,472

    Re: Countif statement not counting correctly for percentages

    it is because you have no data actually equal to 10% or 0%
    add a round formula to column D data and round to 2 places.


    EDIT: chemist beat me
    Last edited by dosydos; 03-10-2016 at 01:30 PM.

  4. #4
    Registered User
    Join Date
    11-06-2003
    MS-Off Ver
    2013
    Posts
    75

    Re: Countif statement not counting correctly for percentages

    I did not think about using the round function. Thanks that worked. Awesome!

+ 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] COUNTIF not counting correctly
    By helencj in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-24-2015, 07:42 AM
  2. Countif not counting date correctly
    By ciresuark in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-03-2015, 07:27 PM
  3. Pivot Chart Value displayed as percentages not working correctly
    By sherry1067 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 03-19-2014, 12:24 PM
  4. [SOLVED] SUMPRODUCT, COUNTIF formulas not correctly counting based on two sets of criteria
    By justinbelkin in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-11-2013, 10:12 AM
  5. Replies: 7
    Last Post: 12-16-2012, 08:24 PM
  6. [SOLVED] Can't Get Numbers to Subtract Correctly Using Percentages
    By randynavarro in forum Excel General
    Replies: 4
    Last Post: 09-08-2012, 12:52 AM
  7. Countif not counting correctly...
    By AaronK in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-18-2012, 12:43 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