View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
David David is offline
external usenet poster
 
Posts: 1,560
Default Counting based on characters.

Since the last 4 characters are all the same, the count would be the same, if
they are included. If this is not acceptable, you might think of pulling the
first 7 characters out into another column with =left(CellAddress, 7), then
doing a =CountIf(characters, Range). No VBA involved.

David

"Sinner" wrote:

I have the following list. I want VBA solution to get a count of first
7 characters.


List
03439061122
03439061122
03439061122
03449831122
03452401122
03455251122
03455251122
03455251122
03455251122
03455251122
03455691122
03457711122
03458331122
-----------------------------
Count
0343906 3
0344983 1
0345240 1
0345525 5
0345569 1
0345771 1
0345833 1
________________

Thx.