+ Reply to Thread
Results 1 to 6 of 6

Using multiple countifs to return result based on multiple columns

  1. #1
    Registered User
    Join Date
    06-02-2017
    Location
    Newbury
    MS-Off Ver
    2010
    Posts
    50

    Using multiple countifs to return result based on multiple columns

    Hi guys,

    I'm trying to use 2 countifs in one formula as shown in the attachment.

    I would like Report!B3 to look at the department in Report!B1, look for that in Blocks!A2:A11, and count the number of "blocked bins".

    The problem I've been having is that there are 2 columns depicting block types, so I tried countifs+countifs and countifs*countifs but I'm not getting the desired result.

    If Blocks!B:B contains a X then that counts as a block, same as if there is a X in Blocks!C:C, same as if there is a X in both columns.

    Therefore, the result that I'm trying to get in highlighted cell Report!B2 is 3 (bins in rows 2, 3 and 4 on Blocks! tab).

    I hope this makes sense.
    Attached Files Attached Files

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,952

    Re: Using multiple countifs to return result based on multiple columns

    One quick and dirty way:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    BSB

  3. #3
    Registered User
    Join Date
    06-02-2017
    Location
    Newbury
    MS-Off Ver
    2010
    Posts
    50

    Re: Using multiple countifs to return result based on multiple columns

    Thanks BadlySpelledBuoy. This works in the example spreadsheet but for some reason when I move it to my actual spreadsheet and change the formula to match the new cell range, it provides the correct number but with a minus in front of it. Any idea why it would do that?

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,952

    Re: Using multiple countifs to return result based on multiple columns

    To answer that I'd need to see the file with the formula in place.

    Any chance of a desensitized version?

    BSB

  5. #5
    Registered User
    Join Date
    06-02-2017
    Location
    Newbury
    MS-Off Ver
    2010
    Posts
    50

    Re: Using multiple countifs to return result based on multiple columns

    Hi BSB, it turns out that it was due to the source data not being in number format, I didn't think that would cause this kind of an anomaly.

    Thanks for your help on this thread.

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,952

    Re: Using multiple countifs to return result based on multiple columns

    Glad I could help

    Thanks for the rep.

    BSB

+ 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: 2
    Last Post: 06-03-2017, 05:01 PM
  2. [SOLVED] Return result based on multiple criteria..
    By Frazzfreeman in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-02-2014, 03:47 AM
  3. Replies: 7
    Last Post: 09-06-2013, 11:59 PM
  4. lookup multiple values in multiple columns to return a result
    By AYAHOO123 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-11-2013, 07:53 PM
  5. Indexing multiple columns to return a result from a separate column
    By janjan_376 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-23-2009, 03:14 PM
  6. Return Result based on Multiple Criteria
    By franciz in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-20-2009, 01:30 PM
  7. Compare Values in Multiple Columns and return a result
    By edbhome in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-18-2009, 09:37 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