View Single Post
 
Old 08-29-2014, 03:47 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,359
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

For the Find, I'd suggest using:
.Text = "[A-Z]{2,}-[0-9A-Z\-]{1,}"
That should be sufficient to return all the strings you're concerned with. However, it's far from clear now what you want to do with them. You originally said:
Quote:
How do I format the return string for the Right function to find UPPERCASE letters
and provided pseudo-code for getting the two right-most characters. The code I posted does that, but I really have no idea what you want to do with what the Find returns.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote