Check multiple column sizes for criteria?

kes0_

New Member
Joined
Apr 2, 2021
Messages
3
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hello, I have 3 columns of data and I'd like to count a criteria that appears in the first column AND a second criteria that can appear in either of the last 2 columns. However COUNTIFS does not take ranges of different sizes, and I can't get SUMPRODUCT to work because I need to use Wildcards since some of the data values varies but would still count for my criteria. What can I do?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

kes0_

New Member
Joined
Apr 2, 2021
Messages
3
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have tried =SUM(--(FILTER(D5:E999, C5:C999="Undergrad")="Letters*")) . How can I change this so that it would work? Thanks!
 

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
6,007
Office Version
  1. 2016
Platform
  1. Windows
Hi,

Can your criteria (Letters*) appear in Both column D and E on the same row?

Edit: If so, does it Count as 1 or 2?
 
Last edited:

kes0_

New Member
Joined
Apr 2, 2021
Messages
3
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
No, it can only appear in one of them. Thanks!
 

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
6,007
Office Version
  1. 2016
Platform
  1. Windows
Thanks for the info.

If I understand correctly...
I don't have the FILTER function, but this SUM/COUNTIFS and SUMPRODUCT should work:

Change/adjust Cell Range/references to suit your data:

Book3.xlsx
BCDE
1
2
33UndergradLettershead
43Undergrad
5UndergradLettershirt
6Undergrad
7UnderLetters
8UnderLetters
9UndergradLetters
10
Sheet888
Cell Formulas
RangeFormula
B3B3=SUM(COUNTIFS(C1:C10,"Undergrad",D1:D10,"Letters*"),COUNTIFS(C1:C10,"Undergrad",E1:E10,"Letters*"))
B4B4=SUMPRODUCT((C1:C10="Undergrad")*(ISNUMBER(SEARCH("Letters",D1:E10))))
 
Solution

Watch MrExcel Video

Forum statistics

Threads
1,130,156
Messages
5,640,453
Members
417,143
Latest member
boukadidanizar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top