Need formula t0 extract # between ()

Russk68

Well-known Member
Joined
May 1, 2006
Messages
589
Office Version
  1. 365
Platform
  1. MacOS
Hello all
I need to extract the number like in the example below.
Between the () is always (#ch).

Before: 16-bit Enhanced (46ch)
After: 46

Thank you!
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
with PowerQuery aka Get&transform

rawResult
16-bit Enhanced (46ch)46

Code:
[SIZE=1]// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    TBD = Table.AddColumn(Source, "Result", each Text.BetweenDelimiters([raw], "(", "ch"), type text),
    ROC = Table.SelectColumns(TBD,{"Result"})
in
    ROC[/SIZE]
 
Upvote 0
Assuming the first instance of "(" in the string is in "(#ch), copy B1 down.
Excel Workbook
AB
116-bit Enhanced (46ch)46
2(3ch) 32-bit content3
364-bit (128ch) control128
4nothing
Sheet1
 
Upvote 0
Hi,

Another option:


Book1
AB
116-bit Enhanced (46ch)46
232-bit (144ch)144
364-bit (299 not specified)299
4nothing
5(3ch) 32-bit content3
Sheet701
Cell Formulas
RangeFormula
B1=IFERROR(-LOOKUP(1,-LEFT(MID(A1,FIND("(",A1)+1,99),ROW($1:$15))),"")


Change/adjust cell references/range as needed, formula copied down.
 
Upvote 0
If, as JoeMo assumed, the letters after the number are always "ch", then here is another formula you can consider...

=IFERROR(0+MID(LEFT(A1,SEARCH("ch)",A1)-1),FIND("(",A1)+1,99),"")

otherwise use the formula jtakw posted.
 
Last edited:
Upvote 0
Yes. I see some solutions that I am going to try.
Thank you!
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,558
Latest member
aivin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top