on ‎2011 Sep 09 5:42 AM
Hi,
what value will be returned from the below, if the 2nd string is a part of the 1st one? and what value will be returned from the below, if the 2nd string is not a part of the 1st one?
instr({?Skill}, totext({vweShowAnswers.ANS_QId},0,"") )
Thanks & Best Regards
Edward
Request clarification before answering.
just going on from Abhilash
the result is the offset in the first string of the second string and 0 if it not in the first string.
put some sample data and simplify to instr(A$,B$)
abcdef def ( 4)
abcdef abc (1)
abcdef jjk (0 not found)
abcabc abc (1 the first )
instr("abcabc","abc",0) = 1
instr("abcabc","abc",2) = 4 ( this is not the second but starting from the second char)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Edward,
Well, if the second string is a part of the first one then the formula will return 1 otherwise it will return 0.
For Eg:
Instr("SAPBO","SA") //Returns 1
Instr("SAPBO","SB") //Returns 0
Hope this helps!
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.