Formula to extract 5 or 6 digits based on the text

shre0047

Board Regular
Joined
Feb 3, 2017
Messages
53
Office Version
  1. 365
Platform
  1. Windows
I have a column with similar cells but spacing around the colon varies.

[TABLE="width: 500"]
<tbody>[TR]
[TD]ID1: 52685
ID2: 83145
ID3: 52973
ID4: 84814
Name: Kevin [/TD]
[/TR]
</tbody>[/TABLE]


FOr one formula, I want to find ID1, then extract the number 52685 which I have the following:
=MID($A2,MIN(FIND({0,1,2,3,4,5,6,7,8,9},$A2&"0123456789")),5)
How do I conduct it if it's 6 characters?

The other formula, I want to find ID4, and extract number 84814
 
Last edited:

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
You're welcome, thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,847
Messages
6,181,321
Members
453,032
Latest member
Pauh

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