Count Word in long string

T

tamer

Dears

I want to count how many specific word is repeted in long string in on
cell i will give you example

Red , green , red , blue , ,black ,green , red, red,

what i want to do is to count how many times the word red repete
starting from the right hand side till the fourth coma only not throug
the whole sting only till the fourth com
 
C

Claus Busch

Hi,

Am Sat, 23 Mar 2013 10:55:18 +0000 schrieb tamer:
Red , green , red , blue , ,black ,green , red, red,

what i want to do is to count how many times the word red repeted
starting from the right hand side till the fourth coma only not through
the whole sting only till the fourth coma

your string in A1. Then try:
=(LEN(RIGHT(A1,LEN(A1)-FIND("#",SUBSTITUTE(A1,",","#",4))-2))-LEN(SUBSTITUTE(RIGHT(A1,LEN(A1)-FIND("#",SUBSTITUTE(A1,",","#",4))-2),"red",)))/LEN("red")


Regards
Claus Busch
 
S

shanermuls

tamer;1610548 said:
Dears

I want to count how many specific word is repeted in long string in on
cell i will give you example

Red , green , red , blue , ,black ,green , red, red,

what i want to do is to count how many times the word red repete
starting from the right hand side till the fourth coma only not throug
the whole sting only till the fourth coma


Will it always be until the fourth comma
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top