Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mike
 
Posts: n/a
Default Extract % from text string

I need a formula to extract a % from a text string.

Examples of text:

Percent = 12.45% of total
24.56% of parcel
split is 23%

Any help is appreciated.

Thanks,
Mike
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Why do you want to extract it?
Yopu can replace using editreplace, find what %, leave replace with blank

If you need a formula to extract it use

=MID(A1,FIND("%",A1),1)

Regards,

Peo Sjoblom



"Mike" wrote:

I need a formula to extract a % from a text string.

Examples of text:

Percent = 12.45% of total
24.56% of parcel
split is 23%

Any help is appreciated.

Thanks,
Mike

  #3   Report Post  
Mike
 
Posts: n/a
Default

I need to extract the numerical value:
ie. "12.45%" from - Percent = 12.45% of total
"24.56% from - amount is 24.56% of parcel

Thanks,

Mike



"Peo Sjoblom" wrote:

Why do you want to extract it?
Yopu can replace using editreplace, find what %, leave replace with blank

If you need a formula to extract it use

=MID(A1,FIND("%",A1),1)

Regards,

Peo Sjoblom



"Mike" wrote:

I need a formula to extract a % from a text string.

Examples of text:

Percent = 12.45% of total
24.56% of parcel
split is 23%

Any help is appreciated.

Thanks,
Mike

  #4   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

Hi

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"P ercent = ",""),"of
total",""),"of parcel",""),"split is ","")*1
Or 4 times search & replace all to replace all 4 parts of string with ""


Arvi Laanemets


"Mike" wrote in message
...
I need a formula to extract a % from a text string.

Examples of text:

Percent = 12.45% of total
24.56% of parcel
split is 23%

Any help is appreciated.

Thanks,
Mike



  #5   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Here's one way:

=--MID(A12,MIN(SEARCH
({0,1,2,3,4,5,6,7,8,9},A12&"0123456789")),FIND("%" ,A12)-MIN
(SEARCH({0,1,2,3,4,5,6,7,8,9},A12&"0123456789")))

This will return 12.45 as a numeric value. If you want
the value formatted as a percent, you will have to format
the cell as percent then use this formula:

=--MID(A12,MIN(SEARCH
({0,1,2,3,4,5,6,7,8,9},A12&"0123456789")),FIND("%" ,A12)-MIN
(SEARCH({0,1,2,3,4,5,6,7,8,9},A12&"0123456789"))+1 )

Biff

-----Original Message-----
I need to extract the numerical value:
ie. "12.45%" from - Percent = 12.45% of total
"24.56% from - amount is 24.56% of parcel

Thanks,

Mike



"Peo Sjoblom" wrote:

Why do you want to extract it?
Yopu can replace using editreplace, find what %, leave

replace with blank

If you need a formula to extract it use

=MID(A1,FIND("%",A1),1)

Regards,

Peo Sjoblom



"Mike" wrote:

I need a formula to extract a % from a text string.

Examples of text:

Percent = 12.45% of total
24.56% of parcel
split is 23%

Any help is appreciated.

Thanks,
Mike

.



  #6   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Wed, 1 Dec 2004 11:05:04 -0800, "Mike"
wrote:

I need a formula to extract a % from a text string.

Examples of text:

Percent = 12.45% of total
24.56% of parcel
split is 23%

Any help is appreciated.

Thanks,
Mike


It's not clear exactly what you want for a result.

If, on your first sentence, you want as a result the Text String 12.45%, then
the **array-entered** formula:

=MID(LEFT(A1,FIND("%",A1)),MATCH(TRUE,
ISNUMBER(-MID(A1,ROW(INDIRECT(
"1:255")),1)),0),255)

will do that. To **array-enter** a formula, hold down <ctrl<shift while
hitting <enter. Excel will place braces {...} around the formula.

If you want the numeric value 0.1245 (whihch you could then format as a
percent), then the **array-entered** formula:

=--MID(LEFT(A1,FIND("%",A1)),MATCH(TRUE,
ISNUMBER(-MID(A1,ROW(INDIRECT(
"1:255")),1)),0),255)

will do that.

Finally, if you want the text string:

Percent = 12.45 of total

then:

=SUBSTITUTE(A1,"%","")




--ron
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
How do I remove all spaces in a text string dn Excel Discussion (Misc queries) 3 April 2nd 23 07:20 PM
Extract hyperlink string from excel cell Ryan Sapien Links and Linking in Excel 1 January 20th 05 12:24 AM
Formating a text string? METCO1 Excel Discussion (Misc queries) 2 November 30th 04 06:31 PM
Newbie: How to search a text string from right Frank Krogh Excel Worksheet Functions 5 November 26th 04 07:16 PM
How do you extract numbers from a string of chacters in a cell (E. blackbeemer Excel Worksheet Functions 6 November 12th 04 09:00 AM


All times are GMT +1. The time now is 06:17 AM.

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"