+ Reply to Thread
Results 1 to 15 of 15

CountIf, Excluding Columns Or Cells...

  1. #1
    Registered User
    Join Date
    10-19-2017
    Location
    Raleigh, NC
    MS-Off Ver
    2013
    Posts
    22

    CountIf, Excluding Columns Or Cells...

    CountIf formula to count number of times certain text appears, but want to leave out every 8th column from the selected range...is this possible?

    Formula is currently, =COUNTIF(F17:AYF17,"CAN")...but I don't want to total every 8th cell within that range.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: CountIf, Excluding Columns Or Cells...

    It would be simpler to do if there was some sort of common value or text in the rows to be excluded (even in another column). Is that the case?
    Audere est facere

  3. #3
    Registered User
    Join Date
    10-19-2017
    Location
    Raleigh, NC
    MS-Off Ver
    2013
    Posts
    22

    Re: CountIf, Excluding Columns Or Cells...

    In the column to be excluded, it could be one of four values (MOT, CAN, VOT, CLEAR).

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: CountIf, Excluding Columns Or Cells...

    What about in a different row, like a Header ?
    Is there anything common that could flag which cells should be included (or NOT included) ?

    So we could do something like
    =COUNTIFS(F17:AYF17,"CAN",F$1:AY$1,"<>NotThisOne")

    I'm just making up the 'notthisone' string, but hoping there is something there than can be used logically.

    Maybe attach a sample file, maybe we can find something.

    Remember to desensitize the data.
    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Registered User
    Join Date
    10-19-2017
    Location
    Raleigh, NC
    MS-Off Ver
    2013
    Posts
    22

    Re: CountIf, Excluding Columns Or Cells...

    File attached...thank you all your help!
    Attached Files Attached Files

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: CountIf, Excluding Columns Or Cells...

    Try
    =COUNTIFS(F17:AYF17,"CAN",F$14:AY$14,"<>Week")

  7. #7
    Registered User
    Join Date
    10-19-2017
    Location
    Raleigh, NC
    MS-Off Ver
    2013
    Posts
    22

    Re: CountIf, Excluding Columns Or Cells...

    I received #VALUE! when entering that formula.

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: CountIf, Excluding Columns Or Cells...

    I typed the range.. AY$14 should be AYF$14

  9. #9
    Registered User
    Join Date
    10-19-2017
    Location
    Raleigh, NC
    MS-Off Ver
    2013
    Posts
    22

    Re: CountIf, Excluding Columns Or Cells...

    Wow, it works...thank you so much, you are a life saver!!!!! Cannot tell you how thankful I am!!! I really appreciate!!!!

  10. #10
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: CountIf, Excluding Columns Or Cells...

    You're welcome.

  11. #11
    Registered User
    Join Date
    10-19-2017
    Location
    Raleigh, NC
    MS-Off Ver
    2013
    Posts
    22

    Re: CountIf, Excluding Columns Or Cells...

    Would I be able to add another criteria to be added in that formula; for instance I'm already counting the number of times 'CAN' appears in the range, how would I also be able to count all figures > than 0 in the range as well?

  12. #12
    Registered User
    Join Date
    10-19-2017
    Location
    Raleigh, NC
    MS-Off Ver
    2013
    Posts
    22

    Re: CountIf, Excluding Columns Or Cells...

    Nevermind...I answered my own question.

  13. #13
    Registered User
    Join Date
    10-19-2017
    Location
    Raleigh, NC
    MS-Off Ver
    2013
    Posts
    22

    Re: CountIf, Excluding Columns Or Cells...

    Is there a way to use this same formula, but only for a period of 6 weeks? My columns signify the days, weeks of the year...if I only want to count the totals for a period of 6 weeks, how would I be able to go about that?

  14. #14
    Registered User
    Join Date
    12-21-2021
    Location
    USA
    MS-Off Ver
    not sure
    Posts
    1

    Re: CountIf, Excluding Columns Or Cells...

    Quote Originally Posted by Jonmo1 View Post
    Try
    =COUNTIFS(F17:AYF17,"CAN",F$14:AY$14,"<>Week")
    =COUNTIFS(DAILY!MA39:XFD39,"100%",DAILY!MA$39:ABJ$39,"<>FW")

    Can you tell me why this is not working. I want to count the number of times 100% is in row 39, but I want to ignore every 8th column. thanks

  15. #15
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: CountIf, Excluding Columns Or Cells...

    Quote Originally Posted by Ccoffey71 View Post
    =COUNTIFS(DAILY!MA39:XFD39,"100%",DAILY!MA$39:ABJ$39,"<>FW")

    Can you tell me why this is not working. I want to count the number of times 100% is in row 39, but I want to ignore every 8th column. thanks
    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread

    (countifs() needs single column refs)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Countif excluding duplicates
    By DonJuan85 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-28-2016, 02:16 PM
  2. Using COUNTIF while excluding cells with "-"
    By warrior2411 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-14-2016, 06:38 PM
  3. Excluding Cells in COUNTIF() function.
    By CXF in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-28-2012, 10:43 AM
  4. excluding values using countif
    By hooha2012 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-12-2012, 06:04 PM
  5. countif excluding zeroes?
    By alaibubu in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-22-2007, 06:39 AM
  6. How do I use countif to count values excluding blank cells
    By Glenda in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-30-2006, 12:30 PM
  7. [SOLVED] COUNTIF - everything excluding a string
    By sans in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-06-2005, 04:05 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