Using Countifs to count a string

mecerrato

Board Regular
Joined
Oct 5, 2015
Messages
184
Office Version
  1. 365
Platform
  1. Windows
I have this formula that I use to count the amount of loans that are "FHA Fixed" but it is counting every instance that it finds the words "FHA Fixed". I want to only count if FHA Fixed is together but it is counting the row if it contains the words "FHA Fixed" anywhere in the column.

Can someone help me tweak this formula?

Formula I am using:
=COUNTIFS(Fundings!$E$2:$E$150000,$B$21,Fundings!$AF$2:$AF$150000,"=" & "*FHA Fixed*",Fundings!$V$2:$V$150000,">="&$B23,Fundings!$V$2:$V$150000,"<"&EDATE($B23,1))
The data us below, the result I desire is a count of 1 loan because there is only 1 "FHA Fixed" but it is also counting the row that has "im FHA Bond Conforming Fixed 30 Year"

Product Name
im BROKERED QUORUM HELOC
Conv Fixed 30 Year
FHA Fixed 30 Year
Conv Fixed 30 Year
Conv Fixed 30 Year
Conv Fixed 30 Year
im FHA Bond Conforming Fixed 30 Year
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
You could replace with =SUMPRODUCT(--EXACT("FHA Fixed", Fundings!$V$2:$V$150000))
 
Upvote 0
That won't work as it should count "FHA Fixed 30 Year" ;)
 
Upvote 0
No it isn't, you must have another row that matches the criteria.
I double checked the data and you pointed out a rookie mistake, I was referencing the wrong cell for the date, once I corrected I got the right result.
One more question though, is there a way of counting if it either has "FHA or FIxed" or "VA Fixed"?
Let me know if you think I should post it as a different thread.
 
Upvote 0
How about
Excel Formula:
=sum(COUNTIFS(Fundings!$E$2:$E$150000,$B$21,Fundings!$AF$2:$AF$150000,{"*FHA Fixed*","*VA Fixed*"},Fundings!$V$2:$V$150000,">="&$B23,Fundings!$V$2:$V$150000,"<"&EDATE($B23,1)))
 
Upvote 0
Solution
How about
Excel Formula:
=sum(COUNTIFS(Fundings!$E$2:$E$150000,$B$21,Fundings!$AF$2:$AF$150000,{"*FHA Fixed*","*VA Fixed*"},Fundings!$V$2:$V$150000,">="&$B23,Fundings!$V$2:$V$150000,"<"&EDATE($B23,1)))
This worked but I always thought that if you are using a curly brace that means it is a CSE formula but this one worked without the CSE.
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Can you please answer my question & update your account details.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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