+ Reply to Thread
Results 1 to 15 of 15

Countif bringing back Value Error.

  1. #1
    Registered User
    Join Date
    09-05-2016
    Location
    AZ
    MS-Off Ver
    2013
    Posts
    29

    Countif bringing back Value Error.

    I am by no means an expert but I have been using formulas for the last couple of years, and either I am attempting to conquer this while my blood sugar is low or I am missing something entirely. I have one range that would be populated with "as needed" dates, or blank spots. I want to only count the dates IF they *1 are not blank *2 a different range has a "Y" in the cell AND*3 if a third range has a "C1" in the cell. My formula looks as such:
    =COUNTIFS(F4:S55,"*",E4:E55,"C1",B4:B55,"Y"). This is by no means my first or 20th attempt at this. After reading forum after forum I have attempted this using many sum/count/if(and functions and I am at the point I have forgotten which all methods I have tried. Now I am reaching out...where am I going wrong on this? Thank you in advance!

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Countif bringing back Value Error.

    =COUNTIFS(F4:S55,"*",E4:E55,"C1",B4:B55,"Y")

    With the COUNTIFS function all the ranges have to be the same size. The first range is multiple columns while the others are single columns.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Countif bringing back Value Error.

    the range of dates not blank
    F4:S55,"*"

    f4:f55, ,"<>"&"")

    is the range f to s correct?
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    09-05-2016
    Location
    AZ
    MS-Off Ver
    2013
    Posts
    29

    Re: Countif bringing back Value Error.

    yes, the larger range is the range needed to count. Each column corresponds to a document and the date within a cell corresponds to a training date. This range is what I need counted BUT only if the other ranges fit my criteria.

  5. #5
    Registered User
    Join Date
    09-05-2016
    Location
    AZ
    MS-Off Ver
    2013
    Posts
    29

    Re: Countif bringing back Value Error.

    If the larger range is what is failing my function.... should I break range up to fit, or is there a better function for my needs?

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Countif bringing back Value Error.

    Ok, what's the criteria for F4:S55?

    In the COUNTIFS function:

    =COUNTIFS(F4:S55,"*",E4:E55,"C1",B4:B55,"Y")

    The criteria "*" means any TEXT value.

  7. #7
    Registered User
    Join Date
    09-05-2016
    Location
    AZ
    MS-Off Ver
    2013
    Posts
    29

    Re: Countif bringing back Value Error.

    I am wanting cells populated with dates and with "as needed". Only blank cells will not be counted, provided the other criteria are met as well.

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Countif bringing back Value Error.

    Quote Originally Posted by Cbirchfi View Post
    I am wanting cells populated with dates and with "as needed". Only blank cells will not be counted, provided the other criteria are met as well.
    OK, so we can interpret that to mean count any cell that is not blank?

    Try this...

    =SUMPRODUCT((B4:B55="Y")*(E4:E55="C1")*(F4:S55<>""))

  9. #9
    Registered User
    Join Date
    09-05-2016
    Location
    AZ
    MS-Off Ver
    2013
    Posts
    29

    Re: Countif bringing back Value Error.

    THANK YOU!!!!!!!!!!!!!!!! I have been working on this for 4 hours.... I would have never used sumproduct!

  10. #10
    Registered User
    Join Date
    09-05-2016
    Location
    AZ
    MS-Off Ver
    2013
    Posts
    29

    Re: Countif bringing back Value Error.

    I just re counted, it's coming up with a much larger number than what is accurate

  11. #11
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Countif bringing back Value Error.

    I think it's time you posted a sample file and tell us what result you expect.

  12. #12
    Registered User
    Join Date
    09-05-2016
    Location
    AZ
    MS-Off Ver
    2013
    Posts
    29

    Post Re: Countif bringing back Value Error.

    I have attached 2 jpg files using the manage attachments option, so let me know if nothing shows. The actual file was too big to load, even with me extracting only 2 sheets and deleting all of the charts. Pic 1 shows the range in which the criteria are being met or not. If any of the cells in B4:B19 are "Y" AND any of the cells in E4:E19 are "C1" then count ALL non blank cells (dates greater than the corresponding dates in row 1, and "as needed"), in the corresponding rows of the criteria, within range "F4:T19". The formula would be in "AZ3" (shown in the second image) as crew 1 completed. All of the cells that aren't date inputs are formulas extracting it from other pages. If this is of no use and there is a way I can get the actual file to you let me know.
    Attached Images Attached Images

  13. #13
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Countif bringing back Value Error.

    Screencaps usually aren't much help.

    The text is so small I can barely see it.

  14. #14
    Registered User
    Join Date
    09-05-2016
    Location
    AZ
    MS-Off Ver
    2013
    Posts
    29

    Re: Countif bringing back Value Error.

    I figured as much.... but the file is too big. Any suggestions?

  15. #15
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Countif bringing back Value Error.

    Don't know what else to suggest.

+ 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. Formula bringing back #NUM! - where did I go wrong?
    By Clanty in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-19-2016, 08:21 PM
  2. Indexing bringing back value of row below the one it should?
    By jonnegri in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-26-2014, 04:26 PM
  3. [SOLVED] VBA not bringing back the correct date
    By jonathan.haynes in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-31-2013, 06:55 AM
  4. [SOLVED] Stop Vlookup bringing back 0's or #REF! and bring back blanks instead
    By Carling73 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-30-2013, 04:43 PM
  5. Excel 2007 : Lookup - bringing back more than one value
    By csalcido in forum Excel General
    Replies: 2
    Last Post: 04-23-2012, 01:59 PM
  6. bringing an array back to a range
    By marko3 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-23-2011, 06:35 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