+ Reply to Thread
Results 1 to 8 of 8

Countifs with one parameter covering multiple columns

  1. #1
    Forum Contributor
    Join Date
    07-07-2014
    Location
    Nottingham
    MS-Off Ver
    Office 2016
    Posts
    370

    Countifs with one parameter covering multiple columns

    Hi

    I am trying to collate data, and part of it is to work out if a particular department has not completed paperwork, and I want to prove that it is not down tot he number of instruments in use, but just bad working practice/"mistakes".

    On the attached (work in progress) workbook, on the "Results by instrument quantity" sheet I want H6 to tell me if a department (F6 dropdown) has not completed ANY submitted paperwork, based on the instrument count (G6 dropdown).

    I know I want it to count:

    If the specified department (F6) appears in 'Tray List Details'!$E$3:$E$32, has the word "no" in any of the cells in 'Tray List Details'!$I$3:$M$32, AND where the instrument count is less than the quantity specified in G6

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


    If I do the same formula on a SINGLE COLUMN and I also specify the instrument count, it returns the correct figure

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


    So, I suppose what I am asking is:
    Am I able to use a cell reference for the instrument quantity?
    If I am unable to monitor all 5 columns, if I want to check each column individually - 1 error, 2 errors, 3 errors etc, am I able to use Data Validation in any way to select the parameters of my COUNTIFS?
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 03-09-2023 at 12:37 PM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,101

    Re: Countifs

    You'll need SUMPRODUCT:

    =SUMPRODUCT(('Tray List Details'!$E$3:$E$32=F6)*('Tray List Details'!$I$3:$M$32="no")*('Tray List Details'!$F$3:$F$32<G6))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,101

    Re: Countifs with one parameter covering multiple columns

    I should have scolded your for your poor thread title... but I didn't see it before posting. So I've changed it for you.

    Do remember, though:

    Hi. Forum Rule 1 is very short. It states: "Title must briefly summarize your request."

    A GOOD thread title is the sort of thing you would use as a search term on Google. Your chosen title would produce a squillion useless hits. You need to take a bit more time to think of a descriptive title that would be "Google-friendly". Many people search the forum answers looking for help and your very general title wouldn't help them at all.

    However, if you continue to use weak titles, you can expect to have your thread BLOCKED until you change it yourself.

    Regards,

    Glenn.

  4. #4
    Forum Contributor
    Join Date
    07-07-2014
    Location
    Nottingham
    MS-Off Ver
    Office 2016
    Posts
    370

    Re: Countifs with one parameter covering multiple columns

    Hi Glenn

    1. Apologies for the thread title. No great excuse, but it was the end of quite a long day.

    2. Thank you for the excellent help with the formula. I have altered it slightly so that I can monitor which part of the paperwork was not completed correctly, rather than just if there was a generic fault, so I am now using
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    And am then using J, K, L and M respectively.

    I am also looking at doing the same for the 1 - 5 faults on each sheet. I assumed that when looking to "Tray List Details $N" it will be looking for either "True" or 1/0, so in "Results by Instrument Quantity M6" I have tried the following formulas, but they all just return 0
    Formula: copy to clipboard
    Please Login or Register  to view this content.

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

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

    or am I miles off target?

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,101

    Re: Countifs with one parameter covering multiple columns

    ??? There are no 1s in column N; only TRUE and FALSE. Am I looking in the right place?

  6. #6
    Forum Contributor
    Join Date
    07-07-2014
    Location
    Nottingham
    MS-Off Ver
    Office 2016
    Posts
    370

    Re: Countifs with one parameter covering multiple columns

    Hi Glenn

    Yes, but wasn't sure if the formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    , which results in True/False posted 1/0 which excel then changed to true/false?

    That is why I tried the formula with 1, 0 and true, but regardless of what I entered for the formula to look for in Column N it didn't return anything other than 0

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,101

    Re: Countifs with one parameter covering multiple columns

    No... it actually returns TRUE or FALSE.


    Modify to:

    =SUMPRODUCT(('Tray List Details'!$E$3:$E$32=F6)*('Tray List Details'!$N$3:$N$32=TRUE)*('Tray List Details'!$F$3:$F$32<G6))

    NB... no "" round TRUE.

  8. #8
    Forum Contributor
    Join Date
    07-07-2014
    Location
    Nottingham
    MS-Off Ver
    Office 2016
    Posts
    370

    Re: Countifs with one parameter covering multiple columns

    You are a gent and a scholar

    thank you.

+ 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] Countifs, reference cell and countifs from multiple tabs
    By rayted in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-22-2022, 04:30 AM
  2. [SOLVED] Countifs by month and Sum does not match Countifs for year, help with syntax needed
    By m_carter in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-08-2021, 10:12 AM
  3. [SOLVED] converting a countifs referencing part of the formula to a indirect countifs
    By DEEARO in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-30-2021, 03:17 PM
  4. Replies: 6
    Last Post: 03-19-2019, 09:14 PM
  5. [SOLVED] Sumproduct to replace countifs as countifs don't work on external source reference
    By KrishnaSagar in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-02-2017, 02:33 AM
  6. COUNTIFS OR...multiple countifs without duplication in the numbers
    By HooligaD in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-21-2012, 09:53 AM
  7. Replies: 0
    Last Post: 12-16-2011, 09:01 AM

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