# Extracting Text

#### ejsifuen1124

##### New Member
I try to stay away from asking questions on this forum as much as possible but I would really appreciate help on finding a solution to a problem!

I'm looking to extract the numbers (one, two or three digits) between certain text/characters. Example assuming the cell is A2:

The formulas would go cells C2:E5 in this example, while extracting the number that corresponds with the table header (row 1) with the information in column A.

I hope this makes sense and thanks in advance!

### Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

#### jtakw

##### Well-known Member
Hi,

Use B2 formula, result is Text, in case you have leading 0 values that you want kept intact (e.g. 012, 005, etc.)
Use G2 formula, result converted to Real numbers, easier for further math/comparisons.

Book3.xlsx
ABCDEFGHIJ
1CAABAC
2C-76,A-2,AB-3,AC-10076231007623100
3AB-1,C-100,AC-2100 12100 12
4AC-3,C-100100  3100  3
5C-3232   32
Sheet828
Cell Formulas
RangeFormula
B2:E5B2=IFERROR(TRIM(LEFT(SUBSTITUTE(MID(","&\$A2,FIND(","&B\$1&"-",","&\$A2)+2+LEN(B\$1),255)&",",",",REPT(" ",99)),99)),"")
G2:J5G2=IFERROR(LEFT(SUBSTITUTE(MID(","&\$A2,FIND(","&B\$1&"-",","&\$A2)+2+LEN(B\$1),255)&",",",",REPT(" ",99)),99)+0,"")

Replies
2
Views
101
Replies
8
Views
106
Replies
10
Views
478
Replies
4
Views
425
Replies
10
Views
661

1,130,126
Messages
5,640,272
Members
417,132
Latest member
Srw123

### 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.

### Which adblocker are you using?

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

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