+ Reply to Thread
Results 1 to 4 of 4

Help with COUNTIFS range, but return as percentage- not counting any row with "0"

  1. #1
    Registered User
    Join Date
    02-24-2017
    Location
    Redding, CA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Help with COUNTIFS range, but return as percentage- not counting any row with "0"

    I need help with the COUNTIFS function. Right now I have =COUNTIFS(D3:D59987,"<30",D3:D59987,">17"), but it's returning a "0", even though I know there are numbers within that range. I also want the resulting number returned as a percentage of the total number of rows, but exclude any row that is "0". For example the data is like:

    First name, Last name, age
    John, Doe, 16
    John, Doe, 43
    John, Doe, 30
    John, Doe, 0
    John, Doe, 44
    John, Doe, 56
    John, Doe, 57
    John, Doe, 71

    I don't have to capture/count anything related to the names, just the age. I want my results to show how many are within the below ranges:

    Pax 1-17 = x%
    Pax 18-29 = x%
    Pax ...
    Pax 70+ = x%

    Total # of rows = 59986

    If I need to, I can return just a regular number rather than a percentage and just create another results row to get the percentage. BTW, in my sheet, Column D is the age column.
    Last edited by jjcgr; 02-24-2017 at 05:45 PM. Reason: Additional info

  2. #2
    Registered User
    Join Date
    02-24-2017
    Location
    Redding, CA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Help with COUNTIFS range, but return as percentage- not counting any row with "0"

    If I need to, I can return just a regular number rather than a percentage and just create another results row to get the percentage.
    Last edited by jjcgr; 02-24-2017 at 05:52 PM.

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Help with COUNTIFS range, but return as percentage- not counting any row with "0"

    Hi jjcgr and welcome to the forum.

    I need help with the COUNTIFS function. Right now I have =COUNTIFS(D3:D59987,"<30",D3:D59987,">17"), but it's returning a "0", even though I know there are numbers within that range.
    This sounds like the numbers are text "numbers". They may look like numbers but have no numeric value.

    To test this in E3

    =ISNUMBER(D3) and fill down. True means they are numbers and False ... well you get the picture.

    If they are false using text to columns often fixes the problem.

    If neither of these things point you in a helpful direction try uploading a sample Excel file (not a screen shot or pic. they are not helpful for trouble shooting)

    If you are not familiar with how to do this


    To attach a file to your post,
    • click “Go Advanced” (next to Post Quick Reply – bottom right),
    • scroll down until you see “Manage Attachments”, click that,
    • click “Browse”.
    • select your file(s)
    • click “Upload”
    • click “Close window”
    • click “Submit Reply”
    • be sure to desensitize the data

    The file name will appear at the bottom of your reply.
    Dave

  4. #4
    Registered User
    Join Date
    02-24-2017
    Location
    Redding, CA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Help with COUNTIFS range, but return as percentage- not counting any row with "0"

    That was it! Thanks! I just had to convert the fields to numerical values, and it worked fine.

+ 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] Calculating a percentage of "Y" and "N" in dynamic cell range
    By InkyDrinky in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-30-2016, 01:35 PM
  2. Vba: Using Countifs for Calculating " < " Percentage
    By vidyuthrajesh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2014, 06:53 PM
  3. Replies: 5
    Last Post: 01-23-2014, 11:02 AM
  4. If formula to return "yes" or "no" answer from a range of cells
    By mfairhurst1 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-02-2013, 05:00 PM
  5. Replies: 3
    Last Post: 04-14-2013, 11:53 PM
  6. Return "green", "yellow" or "red" from date/age and priority ranking
    By Cantaloop in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-04-2013, 12:12 AM
  7. Replies: 3
    Last Post: 02-16-2011, 02:55 PM

Tags for this Thread

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