Formula to count blanks and specific characters

jpkreider

New Member
Joined
Sep 22, 2017
Messages
15
Good Morning,

I am terrible with formulas and was hoping to get some help. I'm trying to create a formula that counts
blanks as well as any cell that contains these characters ("O", "TR", "LD", "D"). I keep getting a too many arguments error. Is this even possible? Here is what I thought the formula should look like. Thanks for looking!!

=COUNTIF(C7:C17,"","O","TR","LD","D")
 

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.
Take a look at the documentation of the COUNTIF function. It only has two arguments.
COUNTIFS allows more conditions, but there must be a range explicitly listed for each condition (see: https://www.techonthenet.com/excel/formulas/countifs.php).
However, I don't think that is what you want either, as that will only count records if ALL conditions are not, not any single criteria.

See Scott's reply above for how to do it.
 
Last edited:
Upvote 0
Thank you for your response. I really appreciate it. Sorry, but I understood this wrong. I need to count all cells that are blank and count all cells that have any characters except O, TR, LD, D. If the cell has any of these letters or letter combinations, I want to exclude them from the sum. I hope that makes sense and is probably a long shot, but worth a try. Thanks!
 
Upvote 0
=ROWS(C7:C17)-SUM(COUNTIF(C7:C17,{"","o","tr","ld","d"}))
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,812
Members
449,095
Latest member
m_smith_solihull

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