+ Reply to Thread
Results 1 to 7 of 7

Count all numeric values in a range but only every 7th column

  1. #1
    Registered User
    Join Date
    06-20-2019
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    18

    Count all numeric values in a range but only every 7th column

    I've been searching for a way to count the number of numeric (only) values within a range of cells who's column number (+ 1) is a multiple of 7 (meaning every 7th column within the range with the first column being "F").
    So my base formula would be COUNT(F3:EL162) however I only want the count function to search through every 7th column within that range with F being the first ie. columns F, M,T, AA, AH ... and so on.
    Is there a way to do this without me having to use the formula =COUNT(F3:F162)+COUNT(M3:M162)+COUNT(T3:T162)... and so on for another 17 odd column ranges?
    By the way the last possible included column for my requirement would be EL. Alternatively the formula could search every 7th column starting with column F - 20 x times (this would finish just before column EL so same result).
    Thanks for reading.

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Count all numeric values in a range but only every 7th column

    one option

    =SUMPRODUCT(ISNUMBER($F$3:$EL$162)*(MOD(COLUMN($F$3:$EL$162)-COLUMN($F3),7)=0))

  3. #3
    Registered User
    Join Date
    06-20-2019
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    18

    Re: Count all numeric values in a range but only every 7th column

    Worked a treat! Thank you very much.

  4. #4
    Registered User
    Join Date
    06-20-2019
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    18

    Re: Count all numeric values in a range but only every 7th column

    I hope this didn't require a new thread but...
    If I wanted to know how many of the numeric values from above result were the number 0?
    Using my late night logic I have tried (unsuccessfully): =SUMPRODUCT(COUNTIF(Data!$F$3:$EL$162,"=0")*(MOD(COLUMN(Data!$F$3:$EL$162)-COLUMN(Data!$F3),7)=0))
    (sheet is called "Data" which I didn't mention in previous post)

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Count all numeric values in a range but only every 7th column

    You were close. You don't need the countif inside the SUMPRODUCT and you will still need the ISNUMBER if you have blank cells as they will return TRUE for cell=0. So

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Does that work?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  6. #6
    Registered User
    Join Date
    06-20-2019
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    18

    Re: Count all numeric values in a range but only every 7th column

    The result is about what I would expect (without actually counting through all the data) so I'm going to say yes.
    Thanks very much to you too!

  7. #7
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,444

    Re: Count all numeric values in a range but only every 7th column

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Replies: 8
    Last Post: 06-25-2015, 10:06 PM
  2. Count cells with a certain numeric range value
    By C Holmes in forum Excel General
    Replies: 7
    Last Post: 07-17-2014, 02:00 PM
  3. Replies: 9
    Last Post: 11-18-2013, 07:40 AM
  4. [SOLVED] Help find MAX value in one column when numeric & alph-numeric values are present
    By KevinAB in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-01-2013, 11:29 AM
  5. [SOLVED] Count numeric values in different arrays
    By Rehanf in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-16-2012, 06:40 PM
  6. [SOLVED] Count Intervals of 1 Numeric value in a Row and Return Count down Column
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-04-2005, 12:05 PM
  7. [SOLVED] Count Intervals of 2 Numeric values in same Row and Return Count across Row
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-24-2005, 06: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