Hi Gurus,

In excel sheet Column A contains the strings like the follwing.

ex: 1. "Fwd: A9504X1-1435 effexor - mexico - category"
      2. "Re: effexor - taiwan - category B5343x4-1346"
      3. "Fwd: Protocol number 2353x1- 4353 taiwan"
      4. "Re : A3536x6 - 5325 protocol number"
      5. "Protocol number 3536x5-5643"
      6. "Fwd: effexor - 3563x7_35363 mexico - category"
      7. "Re: Taiwan E5643x1 63642 protocol number"
      8. "Fwd:  mexico protocol 34633-34267"

I need output like the follwing in Column B.

1. A9504X1-1435
2. B5343x4-1346
3. 2353x1-4353
4. 2353x1-4353
5. A3536x6-5325
6. 3563x7-35363
7. E5643x1-63642
8. 34633-34267

I need to capture only number part from the above strings like
A3536x6-5325.  Some there will be spaces or undersocre between two
numbers, generally hyphen will be there between two numbers.

Spaces and underscore needs to be replace with hyphen.


Please kindly help me with RegExp (Regular Expression) or any vba
procedure or function to capture the numbers.

Thanks & Regards

Ramesh

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,800 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

To unsubscribe from this group, send email to 
excel-macros+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to