Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Thomas Evans   on Jan 23 In MS Office Category.

  
Question Answered By: Stacie Martin   on Jan 23

This is a perfect task for regular expressions. I've never used them in
Excel, but they seem to be there, as an add-in.

Have a look at this URL www.vbaexpress.com/kb/getarticle.php?kb_id=68
for a download that demonstrates the add-in.

I'm a complete novice at regular expressions, but an experienced RegExp'er
would trot out a match string for your patterns without even breaking a
sweat.

My preferred approach would be to create a match string that found
everything EXCEPT your numeric string and removed it, and placed the result
in the appropriate cell. This would leave you with your numeric string or
nothing.

The other cell  could be filled by using Replace to eliminate the numeric
string and one of its delimiting spaces if the numeric string cell is
non-empty. (Or just use the inverse of the RegExp if you prefer.)

Share: 

 

This Question has 17 more answer(s). View Complete Question Thread

 


Tagged: