VBA – selecting middle portion of a string

255 pts.
Tags:
Excel 2003
Microsoft Excel 2003
String manipulation
VBA
Visual Basic for Applications
I'm having trouble pulling the middle portion out of a dynamic string. Ex: Orginal String 1 = John Doe, Age 35 (asd) Original String 2 = Tom Thompson, Age 100 (jkl) I need the code to produce... New String 1 = 35 New String 2 = 100 I've tried to research this, but am new to VBA and a lot of what I'm seeing doesn't make sense to me...VBA for Dummies please :)

Answer Wiki

Thanks. We'll let you know when a new response is added.

Look for SUBSTRING and PATINDEX (I think VBA has both of those functions).

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • carlosdl
    If you have some code that is not working, you might want to post it. You will get more specific help this way.
    68,495 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following