+ Reply to Thread
Results 1 to 11 of 11

COUNTIFS with a column containing the words "true" and "false"

  1. #1
    Registered User
    Join Date
    01-24-2012
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2010
    Posts
    5

    COUNTIFS with a column containing the words "true" and "false"

    Hi All,

    I am new here, and a fairly novice Excel programmer (Excel 2010). I am trying to have one spreadsheet (that will be used to generate a report) search another spreadsheet (where the raw data will be) and count how many times the word true appears corresponding with a date range. Here is what I mean:

    I want excel to count how many times the word "True" appears in Column Y that corresponds to the date range of 01/01/12 - 01/31/12.

    Here is the formula I am using so far, and it continues to return zero. I am assuming it has something to do with the word "true" having a different meaning as a logical expression within excel? This formula has worked for me when I was looking for "c" in a different column, so I am bit confused.

    Column A contains dates in mm/dd/yy format. Column Y contains "True" and "False" intermittently (depending on the data in that particular row). I need to count the "True" in January.

    =COUNTIFS(Y:Y,"True",A:A,">=01/01/12")-COUNTIFS(Y:Y,"True",A:A,">01/31/12")

    Any help would be most appreciated.

    P.S. I can't use a pivot table because of how I need the information to display. Thanks!
    Last edited by TheDerek; 01-24-2012 at 02:37 PM.

  2. #2
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: COUNTIFS with a column containing the words "true" and "false"

    Hi,

    maybe

    Please Login or Register  to view this content.
    Regards
    Last edited by canapone; 01-24-2012 at 01:51 PM.
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    01-24-2012
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: COUNTIFS with a column containing the words "true" and "false"

    Hi CANAPONE

    Thanks for the suggestion, but it still returned "0"

  4. #4
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: COUNTIFS with a column containing the words "true" and "false"

    Hi, can you upload a little sample of your file.

    For sure I'm missing something.

    Regards

  5. #5
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: COUNTIFS with a column containing the words "true" and "false"

    Hi Derek,

    See the attached file and let us know if this is what you were looking for. Thanks.


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  6. #6
    Registered User
    Join Date
    01-24-2012
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: COUNTIFS with a column containing the words "true" and "false"

    Hi DILIPandey,

    Thanks for replying...I think that is close, only I will need to duplicate this formula later for the "false" entry as well, and I am not sure how it worked.

    I have attached what I working on.

    UPDATE: I can get it to work, but only if I let Excel reformat "True" to TRUE - which I believe is an expression? (sorry for my lack of knowledge). Unfortunately, I can't let it do that, as I am going to be creating the final report in a separate spreadsheet and I don't want the end user of this report to have to reformat any of that data (they may or may not have rights to do so).

    Again, super grateful for any help!

    ExcelCountIfHelp.xlsx

  7. #7
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: COUNTIFS with a column containing the words "true" and "false"

    You are welcome Derek..


    See the attached file where I have tried solving your query(ies)

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-24-2012
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: COUNTIFS with a column containing the words "true" and "false"

    Brilliant! Works perfectly. Thank you so much!

  9. #9
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: COUNTIFS with a column containing the words "true" and "false"

    You are welcome Derek..

    Cheers

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  10. #10
    Registered User
    Join Date
    01-24-2012
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: COUNTIFS with a column containing the words "true" and "false"

    P.S. I also learned that =COUNTIFS(Y:Y,"T?ue",A:A,">=01/01/12")-COUNTIFS(Y:Y,"T?ue",A:A,">01/31/12") will work as well (in case anyone else needs this answer). By inserting the ? in the word True (T?ue), it tricks Excel into looking for a string instead of an expression.

  11. #11
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: COUNTIFS with a column containing the words "true" and "false"

    Thanks Derek..


    This is the beauty of wildcards..like * % ? ...

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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