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 comment

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