Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have a set of data that I need to extract the number within the
parentheses. For example, I would like to extract the number 13.68% and 7.77% from the string below using a formula. Can someone help me? 532,251,450.39 (13.68%) 164,649,779.79 (7.77%) |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Assuming (as your examples show) that the number in parentheses is
**always** at the end of the text and those are the **only** parentheses in the text... =SUBSTITUTE(TRIM(RIGHT(SUBSTITUTE(A1,"(",REPT(" ",99)),99)),")","") -- Rick (MVP - Excel) "Confused" wrote in message ... I have a set of data that I need to extract the number within the parentheses. For example, I would like to extract the number 13.68% and 7.77% from the string below using a formula. Can someone help me? 532,251,450.39 (13.68%) 164,649,779.79 (7.77%) |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
Try this =mid(A2,search("(",A2,1)+1,search(")",A2,1)-search("(",A2,1)-1) Hope this helps. -- Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com "Confused" wrote in message ... I have a set of data that I need to extract the number within the parentheses. For example, I would like to extract the number 13.68% and 7.77% from the string below using a formula. Can someone help me? 532,251,450.39 (13.68%) 164,649,779.79 (7.77%) |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
"Confused" wrote:
I have a set of data that I need to extract the number within the parentheses. For example, I would like to extract the number 13.68% and 7.77% from the string below using a formula. [....] 532,251,450.39 (13.68%) 164,649,779.79 (7.77%) =--MID(LEFT(A1, LEN(A1)-1), 1+FIND("(",A1), 99) That assumes you want a numeric result. Omit "--" if you want text. Also, that assumes that the right parenthesis is the last character, as it is in your examples. Finally, 99 at the end is just an arbitrary large number. Choose a larger one if necessary, or replace it with LEN(A1). |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Parsing formatted data | Excel Discussion (Misc queries) | |||
Help me parsing Data and Organizing | Excel Worksheet Functions | |||
Parsing Data with | Excel Discussion (Misc queries) | |||
Help With Parsing Data | Excel Discussion (Misc queries) | |||
Parsing Data | Excel Discussion (Misc queries) |