separation of numbers and text

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Just to address the idea of using a macro... you could do that by translating my previously posted formulas into VB functions like this
Code:
Function TrailingNumber(Cell As Range) As String
  TrailingNumber = Mid(Cell, Evaluate("MIN(FIND({0,1,2,3,4,5,6,7,8,9}," & Cell.Address & "&""0123456789""))"))
End Function

Function LeadingText(Cell As Range) As String
  LeadingText = Left(Cell, Evaluate("MIN(FIND({0,1,2,3,4,5,6,7,8,9}," & Cell.Address & "&""0123456789""))") - 1)
End Function
 
Upvote 0
Stefyu89,

For the sake of providing multiple approaches to tackle the same issue, these are my macros (Not so brillant as RegExp expressions from Hiker 95 but .... ) :

Thank you very much for that.


kashifzia423,


You are very welcome. Glad we could help.

And, come back anytime.
 
Upvote 0

Forum statistics

Threads
1,215,136
Messages
6,123,251
Members
449,093
Latest member
Vincent Khandagale

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