troubleshooting Question

How do you put =LEFT() inside =COUNTIF() in Excel?

Avatar of Steve_Brady
Steve_BradyFlag for United States of America asked on
Microsoft Excel
7 Comments3 Solutions12254 ViewsLast Modified:

How do you correctly put a =LEFT() function inside of a =COUNTIF() function?

For example, here's a formula I just tried (which obviously does not work):


My objective is to determine how many of the entries in the range begin with the two characters:  "##" (i.e. not variables but two number signs) and have the result display in L3.  Therefore, I entered "##" in L2 and the above formula in L3.  

In other words, I don't want to count the cells whose complete entries are the same as L3 but only those whose first two characters are the same.  To do that, it seems like there should be an equal sign in there somewhere saying, "if the first two characters in a given row equal the value in L2 then count that row" but I can't determine where it would go.

Sometimes these formulas just fall right into place and other times it seems as though there is a 12 inch block wall (full of grout) standing in the way!  :p

Join our community to see this answer!
Unlock 3 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros