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

How to install Analysis ToolPak in Excel
The Analysis ToolPak is an Excel add-in program that provides data analysis tools for financial, statistical and engineering data analysis. To load the Analysis ToolPak add-in, execute the following steps. 1....

SQL (Structured Query Language)
SQL (Structured Query Language) is a standardized programming language used for managing relational databases and performing various operations on the data in them. Initially created in the 1970s, SQL...

Hidden Gems of MS Excel - Compare Year-on-Year Performance Using Pivot Table
Did You know You can Compare Year-on-Year& Performance Using Pivot Table?Yes. Just drag-&-drop and Compare Year-on-Year& Performance Quickly.& Year-on-Year simply means Periodic. As per...

Printing Worksheets In Excel
i. Quick Print: If you want to print a copy of a worksheet with no layout adjustment, use the Quick Print option. There are two ways in which we can use this option. Choose File » Print (which...

Presentation Perfect Reports
Presentation Perfect Reports. Why Presentable, neatly crafted Reports makes a job more perfect and easy for Business Analyst who is going make decisions out of the information structured in reports. Many...

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