You can do this with a forumula:
=(LEN(B2)-LEN(SUBSTITUTE(B2,"1w","")))*1+(LEN(B2)-LEN(SUBSTITUTE(B2,"2w","")))*2+(LEN(B2)-LEN(SUBSTITUTE(B2,"3w","")))*3+(LEN(B2)-LEN(SUBSTITUTE(B2,"4w","")))*4+(LEN(B2)-LEN(SUBSTITUTE(B2,"5w","")))*5+(LEN(B2)-LEN(SUBSTITUTE(B2,"6w","")))*6+(LEN(B2)-LEN(SUBSTITUTE(B2,"7w","")))*7+(LEN(B2)-LEN(SUBSTITUTE(B2,"8w","")))*8
where the data are in B2.
The above formula caters for up to 8w - you can add more expressions if you need.
Note that I haven't bothered adding the 'w' to the formula results. You could do that with a custom number format (0w).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|