UrbanPro
true

Learn Advanced VBScript from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

VBA Function - INSTR

Karthik Dale
26/04/2017 0 0

INSTR works similar to FIND function in Excel. INSTR search for specific text in a given text and returns the position number of what you are searching for.

Syntax: InStr( [start_num], string, searchingfor, [compare] )

Sub INSTR_1()

MsgBox InStr(1, "Narendra Modi", " ")

'Output: 9

MsgBox InStr(1, "Narendra Modi", "Modi")

'Output: 10

MsgBox InStr(1, "Narendra Modi", "MODI")

'Output: 0

'To find the 2nd "e" postion number in "excel is awesome"

MsgBox InStr(InStr(1, "excel is awesome", "e") + 1, "excel is awesome", "e")

'Output:4

'Note: INSTR function is a case-sensitive and if it's not found the value then output will be 0

End Sub

0 Dislike
Follow 0

Please Enter a comment

Submit

Other Lessons for You

Tips - How to put PivotTable Field List back at its Original Position?
Have You ever struggled to put PivotTable Field List back at its Original Position?*Original Position - right-side of the worksheet, as highlighted in the following picture: If Your answer is Yes, You...

VBA Tip: Repeating Emp Names N number of times using 4 different loops
Hi All,This is a requirement from one of our student and here we are posting the question along with solution (this can be achieved using 4 different loops). In Column “J” there are few employee...

Tally ERP 9 Shortcuts
Shortcuts: Company Info: Alt+F3 Select Company: F1 Shut Company: Alt+F1 Change Period: Alt+F2 Change Date: F2 Ledger ccreation in Voucher entr: yAlt+C Contra Voucher: F4 Payment Voucher: F5 Receipt...

What is Hyperion?
- Its an Business Intelligence tools. Like Brio which was an independent product bought over my Hyperion has converted this product name to Hyperion Intelligence. Is it an OLAP tool? - Yes. You can analyse...

My Experience on Recruitment for Data Analyst role.
Hi All, I want to share my experience here and why I chose to take up classes on Advanced excel. This is not technical lesson but a motivation to improve your skills. I was leading Data Analyst team...

Looking for Advanced VBScript Training?

Learn from Best Tutors on UrbanPro.

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Advanced VBScript Classes?

The best tutors for Advanced VBScript Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Advanced VBScript with the Best Tutors

The best Tutors for Advanced VBScript Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more