+ Reply to Thread
Results 1 to 8 of 8

countif returns zero

  1. #1
    Registered User
    Join Date
    11-07-2013
    Location
    ny
    MS-Off Ver
    Excel 2010
    Posts
    6

    countif returns zero

    hi there;

    i used the countif to 'count' the months - but for some reason it recognizes some month and gives me the amount, while for the others (who are there) returns zero value? Help

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,494

    Re: countif returns zero

    Think we'd need to see your actual formula and some typical date to offer an opinion.

    Please post a sample workbook.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    11-07-2013
    Location
    ny
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: countif returns zero

    thanks, here is a sample i'm looking to count
    i have table of months:
    from May 2011 to December 2013, and they are all formatted as Custom - i'm refreshing the data from Share Point and they come in that format, so im trying to use countif in order to use If-INDEX formula in order to pull the specific values for those months(Also, there are like 21 value for each of those months)
    When i select a month from the 1st page as july 2013, the next month is recognized (since i used the cell that would subtract 30 from July to give a month backwards) - so june is recognized, but then May is not,and none of them afterwards....
    i don't understand why it recognizes only for example June while not all tthe others, since they are all formatted right? i also tried =SUM(IF($A$3:$A701="E1",1,0)) ,and =SUMPRODUCT(--(A$3:A$701=E1)) none works
    A3 A701 are all those months, while table E1 = the month-30
    also, just for the sake of it, i tried the h/v lookup for a cell by cell, it didnt recognize the value as well?!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,494

    Re: countif returns zero

    If you're getting the data from an external source, particularly a web site, the chances are that there will be non printing characters in the mix. Like I said, we'd need to see the data.


    Regards, TMS

  5. #5
    Registered User
    Join Date
    11-07-2013
    Location
    ny
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: countif returns zero

    how do i attach a file

  6. #6
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,670

    Re: countif returns zero

    Please post a sample workbook
    This is not a workbook

    Often when you got data from another program excel don't recognize dates as dates.
    In excel is it text even celformat is date.
    Change celformat from eg dd-mm-yy to ddd dd-mmmm-yyyy and see what happen
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  7. #7
    Registered User
    Join Date
    11-07-2013
    Location
    ny
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: countif returns zero

    no worries, i figured it out - it coudnt figure out months by just adding +30 - since not all the minths have 30 days, so i used =DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)) formula....

    Thanks though

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,494

    Re: countif returns zero

    Glad you sorted it for yourself.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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] IF/COUNTIF Function for Unique Value returns of either 0 or 1
    By tiger01 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-25-2013, 06:22 AM
  2. Using CountIF formulas and calculating percent average returns #DIV/0!
    By claudiamariep in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-19-2013, 11:10 AM
  3. COUNTIF Problem - Formula returns #Value
    By MCoev in forum Excel General
    Replies: 5
    Last Post: 03-01-2012, 03:45 PM
  4. Insert Comment in Cells Automatically When Countif Returns a Value
    By bro_hof in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-23-2007, 11:30 AM
  5. [SOLVED] use =countif to generate returns from more than one column
    By petess in forum Excel General
    Replies: 7
    Last Post: 04-03-2006, 11:10 AM

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