View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Damil4real Damil4real is offline
external usenet poster
 
Posts: 34
Default Please assist. Extract Number from String

How can I use a macro to extract only the first batch of numbers from
the following type of info?

Examples:

01458-MODE
1548-JUNE
1245-NOD
01054-MORNING
00154-JUNE
55145-55145

Result should be:

01458
1548
1245
01054
00154
55145
--------------------

I only need the first batch of numbers before the "-" sign. There will
always be this sign "-" separating the two batch of data.

Thanks!