+ Reply to Thread
Results 1 to 9 of 9

how do I count every third cell?

  1. #1
    Registered User
    Join Date
    08-20-2009
    Location
    New Franklin, MO
    MS-Off Ver
    Excel 2007
    Posts
    10

    how do I count every third cell?

    I can't figure out which one or how to use count, countif, or countifs correctly.
    here is an example of what i need done:

    I need to how many cells that have a 0 in them
    The cells I need counted are D5,G5,J5,M5...etc. Every 3rd one
    But NOT the ones in between.

    I can get it to count all 0's in all the cells in the row but that's not what I need.
    If some one could show me a formula from the example I have given, I'm sure I could apply it to my spread sheets with ease.

    Thank You
    Last edited by lordFRZA; 08-23-2009 at 04:28 PM. Reason: solved

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: how do I count every third cell?

    Welcome to teh forum.

    Perhaps =SUMPRODUCT( (MOD(COLUMN(D5:Z5)-COLUMN(D5), 3) = 0) * (D5:Z5=0) )

    Blank cells will be counted as zero.
    Entia non sunt multiplicanda sine necessitate

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

    Re: how do I count every third cell?

    TRY

    =SUM(IF(ISNUMBER(D5:X5),IF(D5:K5=0,IF((MOD(COLUMN(D5:X5)-COLUMN(D5),3)=0),1))))

    Where D5:X5 is the entire range to count in..

    confirmed with CTRL+SHIFT+ENTER not just ENTER
    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.

  4. #4
    Registered User
    Join Date
    08-20-2009
    Location
    New Franklin, MO
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: how do I count every third cell?

    thanks for the help guys.
    smg, is there a way to make the blank cells not count as zeros?

    Also what if the cells are not evenly spaced. Is there a way to just type in the cells you want to count zeros in?

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

    Re: how do I count every third cell?

    My formula does not count blanks...try it.

    To count non-contiguous cells with a condition, try:

    =SUM(COUNTIF(INDIRECT({"E6","G6","I6","L6","O6"}),0))

    replace cell refs between quotes with your cell refs or sub-ranges...

    This will not count blanks..just zeroes

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: how do I count every third cell?

    modifying shg's original try for non blanks
    =SUMPRODUCT( (MOD(COLUMN(D5:Z5)-COLUMN(D5), 3) = 0) * (D5:Z5=0)*(D5:Z5<>"") )
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  7. #7
    Registered User
    Join Date
    08-20-2009
    Location
    New Franklin, MO
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: how do I count every third cell?

    thanks alot guys
    I am using NBVC's non-contiguous cells formula. I forgot I need to skip the third cell every third time and then count those seperately. So it's just easier to input each cell I need in each formula.
    But now I have run into another problem. I have gotten the formula worked out on one row but now I need to paste the formula into the rest of the rows. But it keeps coming up exactly as it does in the first row instead of changing the row numbers in the formula to correspond with the row that formula is in. What do I need to do

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,719

    Re: how do I count every third cell?

    Try like this

    =SUM(COUNTIF(INDIRECT({"E","G","I","L","O"}&ROW()),0))

  9. #9
    Registered User
    Join Date
    08-20-2009
    Location
    New Franklin, MO
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: how do I count every third cell?

    thanks everyone

+ 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