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

Computer Basic.
If you know the design of table. Then go to second steps: 1) If you type a long data in a single cell or some other data in next cell, problem arise that the first cell data is not showing clear. Then...

specimen of how to create a Mail Merge in Microsoft Office WORD document. when you will create it will appear as below mentioned document
Mr. SHARMA AVINASH VPSC pvt. ltd., H.NO.16, REVENUE CIRCLE, , CIVIL LINES,NEAR COLLECTRATE, AJMER - 305001, RAJASTHAN INDIA To Mr. SHARMA, Themes and styles also help keep your document coordinated....
V

Vaibhav R.

0 0
0

VBA Function -
Using FORMAT Function in VBA we can modify the format of Numbers, Dates, Times & String. Syntax: FORMAT(expression, format, , ) 1. Formatting "Numbers" using FORMAT function in VBA SUB Format_Numbers() MsgBox...

Avoid VLookup function in excel, instead use index and match combination
Avoid VLookup function in excel, instead use index and match combination. Reason: 1) Index and Match combination will be faster than Vlookup function. In order to proof this you can create 1000 rows...

INDEX Function
Index Function has two forms: 1. Array form - returns a value 2. Reference form - returns a cell reference Array Form: Syntax: INDEX(ARRAY, row_num, col_num) Example: INDEX({10, 20, 30; 40, 50,...
S

Sivasankarit

0 0
0

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