Using Chuck's methodology and standard worksheet functions only (mainly
SUBSTITUTE), I have developed another solution for this. Because of the
limit of 8 nested functions, I have had to split the formulae into 4,
so I have used a second sheet as before. In Sheet2, enter the
following:
C1:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(LOWER(TRIM(Sheet1!A1)),")
",")+"),"a",""),"b",""),"c",""),"d",""),"e","")
(innermost substitute is ")+" for ") " - may get awkward line-break
after posting because of the space)
D1:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(C1,"f",""),"g",""),"h",""),"i",""),"j",""),"k",""),"l",""),"m","")
E1:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(D1,"n",""),"o",""),"p",""),"q",""),"r",""),"s",""),"t",""),"u","")
F1:
="="&SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(E1,"v",""),"w",""),"x",""),"y",""),"z","")
B1: =F1
Copy these down as necessary. The formula in Sheet1 B1 is as before,
i.e.
=Sheet2!B2, copied down as necessary.
As well as the formulae, there is a procedure - Highlight cells in
column B of Sheet2, <copy> then Edit | Paste Special | Values | OK and
<enter>. With the highlight still on those cells, Data | Text to
Columns then click Finish. This is why I've used column B - the main
formulae are still preserved.
This gives the sum of the numbers in each cell. It will cater for
multiple spaces because of the TRIM function, and will also cater for
more than 20 colours in the original cell. Let's hope there are no
punctuation symbols (like "-") used in the text.
As Chuck says in an earlier post, some threads just grab your attention
and seem to have a life of their own.
Pete