View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
 
Posts: n/a
Default Numbers after specific text

On Mon, 13 Mar 2006 11:14:53 -0800, Steve
wrote:

The following data is entered in a cell:

P5-MPC FT 18, P5-MPC FT 25, P5-MPC FT 30, P5-MPC FT 35,P5-MPC PTR 1, P5-MPC
PTF 9

The P5-MPC text is irrelevent. I need the #'s after each FT, after each PTR
and after each PTF, so that my resulting data would be:

FT18
FT25
FT30
FT35
PTR1
PTF1

Could the above be returned in 6 different cells even if the original data
is all in one cell?
Ultimately I need to count all the FTs, all the PTRs, & all the PTFs.(
FT=4,PTR=1, PTF=1)

Any help would be greatly appreciated.

Thanks,

Steve


To count the number of text strings, you can use the SUBSTITUTE function:

If your string is in A1, and B1 contains what you want to count (e.g. FT),
then:

=(LEN($A$1)-LEN(SUBSTITUTE($A$1,B1,"")))/LEN(B1)

will give you the number of FT's.


--ron