how to get substring in VBA excel?

It is for Excel programming like Macro, function, formula, Pivot and other platform support..
forum_admin
Site Admin
Posts: 185
Joined: Wed Jul 16, 2014 9:22 pm
Contact:

how to get substring in VBA excel?

Postby forum_admin » Tue Aug 19, 2014 12:47 am

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?


Guest

Re: how to get substring in VBA excel?

Postby Guest » Tue Aug 19, 2014 12:51 am

You can user LEFT and RIGHT function for string Manipulation.

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 1 guest