COUNTIFS and SUMIFs statement - contains specific text OR specific text - without an array?

banneduser123

Banned - Rules violations
Joined
Mar 29, 2006
Messages
181
hi, two questions: wondering what the most efficient way to write these would be - without just combining multiple countif functions on top of one another to do this without using an array?

1: count the number of times any of the following appears in column R - ABS, BND, or FUND; while exlcuding any time CMO appears.


2. give the sum of any time ABS, BND, or FUND appears in column R; while excluding any time CMO appears.


if it's not possible to do without an array...how would you write the array?

thanks for any help
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Hi

Not clear

If you are only counting ABS, BND, or FUND what do you mean by "while exlcuding any time CMO appears"?

CMO is not being counted.
 
Upvote 0
hi, thanks for the help...

I was just looking for the functionality and was going to tailor whatever help I got later....but there's a lot more criteria...I'm also counting any time a variation of "MBS" appears, by using *MBS*...the problem is then it also picks up "CMBS"....that's why I was just looking for the functionality...is that clear?
 
Upvote 0
Hi

Maybe something like:

=SUM(COUNTIFS(R:R,{"ABS","BND","*MBS*"},R:R,"<>CMBS"))

This will count ABS, BND, and strings including MBS, excluding CMBS
 
Upvote 0
Thanks man.
You know what, I actually tried that while trying to figure it out on my own, but wasn’t sure if it was an array or not. I see that it isn’t now..

How would you do the sumifs function for my second question?
 
Upvote 0
I'd use a similar syntax using SumIfs(). Assuming you add the values in column T for the rows with match:

=SUM(SUMIFS(T:T,R:R,{"ABS","BND","*MBS*"},R:R,"<>CMBS"))
 
Upvote 0

Forum statistics

Threads
1,223,959
Messages
6,175,649
Members
452,663
Latest member
MEMEH

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
Back
Top