Microsoft Excel
--
Questions
--
Followers
Top Experts
Ex. I want to know the amount records that appear with both 02 and 03 in the same column. I currently have the formula only counting 02.
Screenshot attached.
Capture.PNG
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
If you use Sumproduct as suggested by me, you don't need to place an Array formula that is where Sumproduct has an edge over Sum function as Sumproduct can handle arrays.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
=SUM(COUNTIF(A12:A400,{"02
Thanks for catching my goof on the second formula. I edited it to read correctly.
Brad

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Try this to see if that works for you.....
=SUM(COUNTIF(A12:A400;{"02";"03"}))






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
If the formula is copied from the code snippet below and pasted in maximus1974's workbook, it should work without error.
=SUM(COUNTIF(A12:A400,{"02","03"}))

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
=SUM(COUNTIF(A12:A400|{"02","03"}))
OR=SUM(COUNTIF(A12:A400|{"02"|"03"}))
If you use a US version of Excel, I strongly suggest that you change your list separator character to a comma. I've never seen anyone use a pipe symbol like shown in Capture2.PNG in the Region and Language...Customize Format...Numbers control panel--and if you post questions on an Excel forum, everybody assumes that you use a comma as the list separator.
Brad






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Microsoft Excel
--
Questions
--
Followers
Top Experts
Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.