Counting numbers and letters
Hi Sean,
I'm afraid I can't provide a complete code solution to this, but a few
ideas on how to put it together - I'm sure one of the other guys will
give you the details
1) Set up a range that contains your data
2) Use a find loop for each character, setting up a counter variable
ditching the results into a 2d array (a,1), (b,13), ... (9,14)
or perhaps you could do something along the lines of
For Lengt = 1 to Len(ActiveCell)
Select Case Right(Left(ActiveCell,i),1)
Case is = "a"
a = a + 1
Case is = "b"
b = b + 1
.....
Next Lengt
Then step through all filled cells
Any other ideas guys?
Best of Luck
Stephen Wortley
Derivatives Operations
State Street Edinburgh
"Sean" wrote in message ...
I'm looking for a script that will count how many times a number or letter
occurs. It would be beneficial if it could give me a total of all the
numbers 0-9 and all the letters A-Z. For instance...
If I set my cells up like such...
8A-1983
4A-1988
4A-1990
etc...
I want the script to search the entire active sheet or selection and return
a new sheet with something like...
0-1
1-3
2-
3-1
4-2
5-
6-
7-
8-4
9-4
a-3
b-
c-
...
Leaving the value for any zeros as a blank next to the owner.
Thanks in advance.
|