Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Steve
 
Posts: n/a
Default Numbers after specific text

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Arvi Laanemets
 
Posts: n/a
Default Numbers after specific text

Hi

Select the range with strings. Select Replace from Edit menu, into SearchFor
field enter "P5-MPC ", into ReplaceWith field enter nothing, and click on
ReplaceAll button.

Be sure you have enough additional free columns to right of column with
strings (for your example string 5 free columns are needed. With range
containing strings
selected, activate from Data menu TextToColumns wizard. Select comma as
delimiter, and proceed.

There you are!


Arvi Laanemets



"Steve" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Numbers after specific text

Hi!

Try these:

For FT:

=(LEN(A1)-LEN(SUBSTITUTE(A1," FT ","")))/LEN(" FT ")

For PTR:

=(LEN(A1)-LEN(SUBSTITUTE(A1," PTR ","")))/LEN(" PTR ")

For PTF:

=(LEN(A1)-LEN(SUBSTITUTE(A1," PTF ","")))/LEN(" PTF ")

Biff

"Steve" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove
 
Posts: n/a
Default Numbers after specific text

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?

....

The easiest way to do this uses two cells per result. With your string
in cell A1 and the first result in cell D3, try these formulas.

C3:
=MIN(FIND({" FT";" PTR";" PTF"},A1&" FT PTR PTF"))+1

D3:
=MID(A$1,C3,FIND(",",A$1&",",C3)-C3)

C4:
=MIN(FIND({" FT";" PTR";" PTF"},A$1&" FT PTR PTF",C3+LEN(D3)))+1

D4:
=MID(A$1,C4,FIND(",",A$1&",",C4)-C4)

Select C4:D4 and fill down as far as needed, in this case through C8:D8.

  #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


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Steve
 
Posts: n/a
Default Numbers after specific text

Thanks all. I really appreciate the responses.

I'm on another project, so I won't be able to try the suggestions until
later in the week, but will get back with the results.

Thanks again,

Steve

"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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert numbers stored as text to numbers Excel 2000 Darlene Excel Discussion (Misc queries) 6 January 31st 06 09:04 PM
can you find specific text in a string ignoring any other text chriscp Excel Discussion (Misc queries) 1 September 18th 05 09:54 PM
How to reformat numbers stored as text (apostrophe at beginning) Dave Excel Discussion (Misc queries) 1 May 11th 05 02:34 AM
Finding Specific Text in a Text String Peter Gundrum Excel Worksheet Functions 9 April 10th 05 07:21 PM
Sort or Filter option? Mcobra41 Excel Worksheet Functions 3 February 23rd 05 08:22 PM


All times are GMT +1. The time now is 02:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"