Separating/sorting numbers from text

Ian1976

Board Regular
Joined
Feb 4, 2016
Messages
137
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I have a column (F1:F90) which will have either "service due in 9235mi" or "service overdue by 14755mi", is there a way of separating the 9235 or 14755 and put it in its own cell (K1:K90) the numbers will change daily.

Thanks
Ian
 
Copied it

=IF(ISNUMBER(SEARCH("due",F1)),"Service ","Overdue ")&TEXTAFTER(TEXTBEFORE(F1,"mi")," ",3)
 
Upvote 0

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Copied it

=IF(ISNUMBER(SEARCH("due",F1)),"Service ","Overdue ")&TEXTAFTER(TEXTBEFORE(F1,"mi")," ",3)
You may have an extra space in your F1 value. The formula is specifically looking for the 3rd space, if you have a 4th space before the number, it would explain the result you are getting.
 
Upvote 0

Forum statistics

Threads
1,215,341
Messages
6,124,391
Members
449,155
Latest member
ravioli44

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