VBA – Substring Function

VBA is a very good tool to manage data. I always write some mini VBA programs to manipulate database data and create SQLs. Apart from programming, it also gives me some valuable memories with Tinyan

Let’s back to the topic. In VBA, we use Mid() to substring.

'Mid(String, Start As Long, [Length])

aString = "ykyuen.wordpress.com"
myLastName = Mid(aString, 3, 4)

'Return "yuen" to myLastName


Done =)

Reference: Tech on the Net – Excel: Mid Function

8 thoughts on “VBA – Substring Function”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.