+ Reply to Thread
Results 1 to 5 of 5

Countifs with multiple ranges (for experts)

  1. #1
    Registered User
    Join Date
    02-08-2017
    Location
    Nyon, Switzerland
    MS-Off Ver
    MS Pro Plus 2013
    Posts
    2

    Countifs with multiple ranges (for experts)

    Hello excel experts,

    My issue is the following: I am working on a seating plan in Excel where each seat is represented by three cells on three rows. First cell is seat number, below the guest group it is allocated to and finally the lounge/hospitality that is linked to the seat.

    Now, what I would like to do is use a countifs formula to count how many seats I have per guest group AND per lounge/hospitality (example: out of the 25 seats given to "Sponsors", 5 are in the "Gold" lounge ("S" in cells 1-5 row 2 and "G" in cells 1-5 row 3) and 20 are in the "Bronze" lounge ("S" in cells 6-25 row 2 and "B" in cells 6-25 row 3).

    Currently I can solve it for single ranges with Countifs(row 2;"S";row 3;"G") but I cannot manage to do the same for multiple ranges. The seating plan contains 30 rows of seats (thus 90 rows of cells). If anyone has a better solution than doing multiple countifs one after the other that would be an extreme help!

    Thanks in advance for the investigation!
    Attached Files Attached Files
    Last edited by Habim; 02-08-2017 at 01:47 PM. Reason: add attachement

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,190

    Re: Countifs with multiple ranges (for experts)

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on "Reply" then GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    02-08-2017
    Location
    Nyon, Switzerland
    MS-Off Ver
    MS Pro Plus 2013
    Posts
    2

    Re: Countifs with multiple ranges (for experts)

    Thank you for the tip, I attached a sample in the first post.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,190

    Re: Countifs with multiple ranges (for experts)

    in M94

    =SUMPRODUCT(($B$71:$AC$89=M$93)*(MOD(ROW($A$71:$AC$89),3)=2)*($B$70:$AC$88=$J94)*(MOD(ROW($A$70:$AC$88),3)=1))

    in O94

    =SUMPRODUCT(($B$71:$AC$89=O$93)*(MOD(ROW($A$71:$AC$89),3)=2)*($B$70:$AC$88=$J94)*(MOD(ROW($A$70:$AC$88),3)=1))

    Copy both down

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: Countifs with multiple ranges (for experts)

    Another way ...

    M94:

    =COUNTIFS($B$70:$AC$88,$J94,$B$71:$AC$89,M$93)

    O94:

    =COUNTIFS($B$70:$AC$88,$J94,$B$71:$AC$89,O$93)

+ 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. SUMIFS/COUNTIFS for multiple conditions/ranges
    By BoudeyCall in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-31-2017, 04:35 PM
  2. SUMIFS/COUNTIFS for multiple conditions/ranges
    By BoudeyCall in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-09-2017, 09:11 PM
  3. [SOLVED] Help with Countifs in multiple ranges & multiple criteria
    By earlcarl13 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-01-2015, 11:41 PM
  4. Countifs with multiple variables and date ranges
    By genichigo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-25-2015, 03:36 PM
  5. COUNTIFS with multiple non-consecutive ranges
    By Marandopsu in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-08-2014, 08:17 AM
  6. Replies: 4
    Last Post: 03-30-2013, 08:36 AM
  7. Replies: 2
    Last Post: 04-23-2012, 08:16 PM

Tags for this Thread

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