Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking for part of a string

Status
Not open for further replies.

jabmod

MIS
Sep 12, 2004
68
US
If you have a variable JobTitle having "busines manager"
How do I code VB to check that Variable jobTitle contains the word 'Manager'
Note: This variable always has 'manager' as the last word in the string

Thanks.
 
Hi jabmod,

Check out the InStr Function. Or, if it's always at the end you could use the Right Function. See Help for details of both.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at [url=http://www.vbaexpress.
 
Tony,

Your "Before you ask a question" link doesn't seem to work.

Tek-Tips - Page Not Found

 
Thanks dc20. I have corrected it.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top