Find Second Number Set in Cell

dwgnome

Active Member
Joined
Dec 18, 2005
Messages
441
Trying to isolate the second number in cell.

If I have 48X144X68 in J10, I need 144.

I tried:

=MID(J10,FIND("X",J10,2)+1,3) which works, but when a cell has 65X50X68, then I get 50X where I only want 50.
The numbers can vary in size (i.e., 1 to 5 digits) but always separated by an X or some letter.

Thanks,

Excel 2003
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
To get the digits between the "X"'s

=MID(J10,FIND("X",J10)+1,FIND("X",J10,FIND("X",J10)+1)-FIND("X",J10)-1)
 
Upvote 0
Trying to isolate the second number in cell.

If I have 48X144X68 in J10, I need 144.

I tried:

=MID(J10,FIND("X",J10,2)+1,3) which works, but when a cell has 65X50X68, then I get 50X where I only want 50.
The numbers can vary in size (i.e., 1 to 5 digits) but always separated by an X or some letter.

Thanks,

Excel 2003
Here's another possibility...

=--TRIM(MID(SUBSTITUTE(A2,"X",REPT(" ",100)),100,100))
 
Upvote 0
Thank you all for your quick response. They all work perfectly.

However, for neatness I used Biff's solution - only requiring one input "X".
 
Upvote 0

Forum statistics

Threads
1,215,868
Messages
6,127,408
Members
449,382
Latest member
DonnaRisso

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