how to get substring in VBA excel?
-
- Site Admin
- Posts: 185
- Joined: Wed Jul 16, 2014 9:22 pm
- Contact:
how to get substring in VBA excel?
how to get substring in VBA excel? I want to get specific string or substring from the cell value. Is there any way to get specific character or substring using VBA code?
Re: how to get substring in VBA excel?
You can user LEFT and RIGHT function for string Manipulation.
For Example:
So it will take 3 character form left part of the string.
So it will take 8 character form right part of the string.
For Example:
Range("A1").value="How Are You?"
LEFT function to get only "How":
LEFT(A1,3)
So it will take 3 character form left part of the string.
RIGHT function to get only "Are You?":
RIGHT(A1,8)
So it will take 8 character form right part of the string.
Return to “Microsoft Excel and VBA Forum”
Who is online
Users browsing this forum: No registered users and 0 guests