View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Sheeloo[_3_] Sheeloo[_3_] is offline
external usenet poster
 
Posts: 1,805
Default Postcode counting

If you have list of your codes in Col A and list of prefixes (2-4 characters)
in Col B
then enter this in C1

=SUM(IF(LEFT(A:A,FIND(" ",$B1))=LEFT($B1,FIND(" ",$B1)),1,0))

and press CTRL-SHIFT-ENTER
and copy down

This is based on the assumption that prefix is followed by a space and then
remaining three letters...

"Michael" wrote:

I have a large mailing (23,000 pieces) and I have to know how many people I
am mailing to in a particular post code zone.

For example I have postcodes with a prefix ranging from 2 to 4 characters
followed by a further 3 characters (a standard UK postal format)

L1 6TY
L14 8GR
CH42 7TR

I need to count the number of occurrences of L1 (remembering that L14 also
may get counted which should not happen), Then I would need a count for all
L14 and CH42 and all the other Post codes.

can anyone please help

thank you in advance

Michael