+ Reply to Thread
Results 1 to 9 of 9

Countif on multiple ranges - breaking up the range

  1. #1
    Registered User
    Join Date
    08-16-2017
    Location
    London
    MS-Off Ver
    2010
    Posts
    1

    Countif on multiple ranges - breaking up the range

    Hi
    I have a countif formula of

    =IFERROR(COUNTIFS($S$1:$DM$1,LEFT(R$1,4)&"*",$S17548:$DM17548,">=0"),"")

    I am not sure on how to break the range $S$1:$DM$1 so that it does not include columns AS,BL, BM,BO,BP,BQ,CR,DK & DL

    please can someone help

  2. #2
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    549

    Re: Countif on multiple ranges - breaking up the range

    Looks weird to me - I guess your data is laid out horizontally - Okay
    you could break it up:

    =IFERROR(COUNTIFS($S$1:$AR$1,LEFT(R$1,4)&"*",$S17548:$AR17548,">=0")+COUNTIFS($AT$1:$BK$1,LEFT(R$1,4)&"*",$AT17548:$BK17548,">=0")+...

  3. #3
    Registered User
    Join Date
    02-08-2017
    Location
    Greenwood, SC
    MS-Off Ver
    2010
    Posts
    18

    Re: Countif on multiple ranges - breaking up the range

    If you could upload a sample excel file to show an example, it would be a lot more helpful.

    (How to) Upload a Workbook directly to the Forum
    (please do not post pictures or links to worksheets)
    Click Advanced next to Quick Post button at the bottom right of the editor box.
    Scroll down until you see "Manage Attachments",
    Click the "Choose" button at the upper left (upload from your computer).
    Select your file, click "open", click "upload"
    Once the upload is completed the file name will appear below the input boxes in this window.
    Close the Attachment Manager window.
    Click "Submit Reply"
    Note: Please do not attach password protected workbooks/worksheets
    If my answer helped, say thanks. Add reputation.

  4. #4
    Registered User
    Join Date
    08-28-2017
    Location
    usa
    MS-Off Ver
    2016
    Posts
    3

    Re: Countif on multiple ranges - breaking up the range

    New to my first post. Sorry if entered incorrectly.
    I make a 2-pg. workbook for each customer separately, 1-order form, the other a invoice. I am trying to get a total of each conn type as well as how many were purchased for my 3rd pg. (not for the cust. view). I need to know how to work the qty into my formula below. can this be done? (ex. I have 4 mu-mu conn). I want to have this formula on each workbook. So, here is my formula so far:

    =COUNTIF(packtest!D14:D50,"MU-MU") (I need the qty as well)

    "packtest"...This is referencing another page in workbook


    QTY Connectors
    2 Ea 12m mu-mu
    2 Ea 2m MU-MU
    5 Ea 3m sc-sc
    4 Ea 5m lc-lc
    2 Ea 2m fc-sc
    Attached Files Attached Files
    Last edited by rhondalorna; 08-30-2017 at 01:19 PM. Reason: trying to upload

  5. #5
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    549

    Re: Countif on multiple ranges - breaking up the range

    So - looking at the Spreadsheet - where are the results you want?
    1. Don't put spaces in your tab names - it makes them harder to reference
    2. I think you actually want Sumif formula - to get total quantities
    I am assuming the Formula Test = where you want the results -
    So Cell H5 insert =SUMIF(packtest!$C$14:$C$29,G5,packtest!$A$14:$A$29) Then copy down
    In Cell D15 insert =SUMIF(packtest!$D$14:$D$29,C15,packtest!$A$14:$A$29) Then copy down

  6. #6
    Registered User
    Join Date
    08-28-2017
    Location
    usa
    MS-Off Ver
    2016
    Posts
    3

    Re: Countif on multiple ranges - breaking up the range

    I will try this soon. (on vacation) ...yes the 1st two pages will my actual wrkbk. The last two are practice pages. So, Iam trying to get the quantities of LC-LC's & their quantities, SC-SC's & their qty, and so on as they are listed several times witjj different measurements.(hope that made more since. I want to be able to use this formula on each wkbk. But again thank you -

  7. #7
    Registered User
    Join Date
    08-28-2017
    Location
    usa
    MS-Off Ver
    2016
    Posts
    3

    Re: Countif on multiple ranges - breaking up the range

    Sorry for the long delay. Thanks again. I did try this method, however it didn't work. I am not sure how use to the "$" but I can see how it could work. I'd like to see it worked again
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    06-19-2012
    Location
    Panama City, Florida
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Countif on multiple ranges - breaking up the range

    I have a spreadsheet in which I need to count how many times a particular number appears in a non-continuous range of cells. I tried several different ways trying to use the countifs functions with continual FAILURE. FINALLY figured out how to count how many times a particular number appears in the spreadsheet. I took ALL of the non-continuous cells and entered them in a different section of the spreadsheet and MADE the cells continuous (YES, it did take some time to do this but I got the results that I wanted). Then I created the countifis function to reference the continuous range of cells. I now have the solution to find the total number of whatever number that I want.

    Just requires a little bit of common sense to figure out the solution.

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2010/2019
    Posts
    9,871

    Re: Countif on multiple ranges - breaking up the range

    @LWABowler, As per forum rule #2, please start a new thread. If the contents of this thread are relevant to your question you may include a link in your post.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. [SOLVED] Breaking up multiple numeric ranges - questions?
    By Rhudi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-19-2014, 10:28 AM
  2. VBA Countif Multicreteria Multiple ranges
    By flavieng in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-16-2013, 03:38 PM
  3. [SOLVED] multiple ranges in countif formula
    By Losguapos1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-18-2013, 01:51 PM
  4. [SOLVED] Something like COUNTIF but can take multiple ranges?
    By ablits1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-09-2013, 12:37 PM
  5. [SOLVED] trying to do a "countif" with multiple ranges and multiple criteria. Countif, Sumproduct?
    By completelyhis in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2013, 06:12 PM
  6. CountIf of all cells in range that are between two date ranges
    By johncassell in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-17-2010, 09:36 AM
  7. Countif with multiple ranges
    By dr mint in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-20-2010, 02:14 AM
  8. [SOLVED] COUNTIF() With multiple ranges and variables
    By Thansal in forum Excel General
    Replies: 3
    Last Post: 07-12-2006, 12:35 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