+ Reply to Thread
Results 1 to 15 of 15

Excel 2007 : Excel 2007 Countsifs challenge

  1. #1
    Registered User
    Join Date
    05-06-2008
    Posts
    12

    Excel 2007 Countsifs challenge

    I did not realize that countifs only worked in Excel 2007, thanks ratcat.

    Attached is a zipped Excel 2007 worksheet.

    I need to use the Countifs function to populate B39:B43 with the number
    of times a birthday "day of the week" (column E) falls on on the same day of the week in column F.

    Can anyone help?

    Many thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    I don't have 2007, but if I understand you correctly it would be something like:

    =COUNTIFS($E$4:$E$33,C39,$F$4:$F$33,C39)


    or


    =SUMPRODUCT(($E$4:$E$33=B39)*($F$4:$F$33=B39)) which works in all versions.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    NBVC beat me to the punch on a non version specific formula,

    =SUMPRODUCT(($E$4:$E$33=B39)*($F$4:$F$33=B39))

    Note that you will need to remove the trailing space from the formula in E4:E33

    was =TEXT(D9,"dddd ")
    should be =TEXT(D9,"dddd")
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    05-06-2008
    Posts
    12

    Regretfully the countifs suggestion does not work....

    I plugged it in after fixing the error Andy so kindly pointed out but the
    formula does not work.

    I must use a countifs formula.

    I have tried everyone I know and no one seems to know how to
    make this work.

    Any help greatly appreciated.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Not sure if this is the reason why.. but the C39's in my formula should have be B39's

    e.g

    =COUNTIFS($E$4:$E$33,B39,$F$4:$F$33,B39)

  6. #6
    Registered User
    Join Date
    05-06-2008
    Posts
    12

    The "sum" formula also did not work...

    I tried to plug that in but again all it returned were zeros and I know
    that is incorrect.

    However, thanks for the suggestion....

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by Paarlite2
    I tried to plug that in but again all it returned were zeros and I know
    that is incorrect.

    However, thanks for the suggestion....
    When I use the Sumproduct Formula after Andy's fix... I get a 1 beside Wednesday and a 1 beside Friday...

    Not sure if you noticed my previous post where I amended the Countifs() formula?

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    See attached.

    2 records match your description. Wednesday and Friday.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    05-06-2008
    Posts
    12

    Sorry NBVC that still does not work.....

    But at least I am not told that it is a circular problem.....

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Well, like I said I don't have access to Excel 2007, so I can't test the Countifs() but if the Sumproduct() is not working then you have another problem...

    Are you sure you amended the formula for procuring the day as Andy mentioned and copied it down the column?

  11. #11
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Check Andy's upload, it demonstrates how to use COUNTIFS to get the same result as the SUMPRODUCT
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  12. #12
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    So my Countifs() formula was right then..

  13. #13
    Registered User
    Join Date
    05-06-2008
    Posts
    12

    Andy Pope and NBVC

    You are both SUPERIOR BEINGS.....

    Thank you. I have no idea how it works but it does.

    Thank you, thank you, thank you.

  14. #14
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You are welcome.

    Here's a link that explains the Countifs() function:

    http://office.microsoft.com/en-us/ex...474941033.aspx

    Here's one that explains the Sumproduct() function..and it's great flexibility:

    http://www.xldynamic.com/source/xld.SUMPRODUCT.html

  15. #15
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111
    Quote Originally Posted by Paarlite2
    I did not realize that countifs only worked in Excel 2007, thanks ratcat. ..........
    No worries. Sorry that I didn't have enough time to solve the problem at hand.

    Quote Originally Posted by Paarlite2
    You are both SUPERIOR BEINGS.....
    ..........
    That might be a understatment.
    That was something special there, they don't have excel 2007



    Cheers
    Have I made you happy ??? If yes, please make me happy by pressing the http://www.excelforum.com/images/buttons/reputation-40b.png Add Reputation button in my post.
    Please don't forget to do the same to other contributors of this forum.

    Thanks
    I don't void confusion, I create it

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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