Countif left and alphanumberical data

O

Onyx

I'm wanted to build a formula that will do the following,

CountIF(Column begins with array) I can't see to get the function to work.

Reallife example

Count a column of postcodes to find any postcodes beginning with EH, LG,
etc... and giving me a total
 
J

Jacob Skaria

Try the below which will get you the count of postcodes starting with EH

=COUNTIF(A:A,"EH*")


If this post helps click Yes
 
J

Jacob Skaria

With you list in C1:C10 the below will count the entries in A:a100 for which
the first two characters are in the list

=SUMPRODUCT(--(ISNUMBER(MATCH(LEFT(A1:A100,2),C1:C10,0))))

If this post helps click Yes
 
R

Ron Rosenfeld

I'm wanted to build a formula that will do the following,

CountIF(Column begins with array) I can't see to get the function to work.

Reallife example

Count a column of postcodes to find any postcodes beginning with EH, LG,
etc... and giving me a total

If there are no blanks, you could use this formula:

=SUMPRODUCT(COUNTIF(PostCodes,PostCodeList&"*"))

where PostCodes is the range where you have your column of postcodes, and
PostCodeList is the list of specific codes you wish to count.
--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top