Difference between revisions of "Manuals/calci/SEARCH"
Jump to navigation
Jump to search
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"> <font color="#484848"><font face="Arial, sans-serif"><font size="2">'''SEARCH'''</font></font></font><font color="#48...") |
|||
Line 1: | Line 1: | ||
− | + | =SEARCH(ftext, otext, snum)= | |
− | < | + | where |
+ | *<math>ftext</math> is the text to search in original string, | ||
+ | *<math>otext</math> is the original string from which mentioned text is to be searched, and | ||
+ | *<math>snum</math> is an optional argument that specifies the character position to start the search. | ||
− | + | SEARCH() identifies the occurrence of specified text string from the original string and returns the starting position of the matched string. | |
− | + | == Description == | |
− | + | SEARCH(ftext, otext, snum) | |
− | |||
− | |||
− | + | For Example, | |
− | + | SEARCH("COME", "WELCOME",1) returns ''4'' | |
− | |||
− | |||
− | SEARCH | + | *SEARCH function can be used to find text within a text. SEARCH counts 1 byte per characters. MID works with the languages that use 'Single Byte Character Set' (SBCS). |
+ | *<math>otext</math> can be any string containing characters, numbers, symbols, blank spaces etc. | ||
+ | *<math>ftext</math> and <math>otext</math> when directly entered in the command, should be enclosed in double quotes (e.g. "Name"). | ||
+ | *Argument <math>snum</math> is optional. If omitted, Calci assumes to be 1. | ||
+ | *<math>snum</math> should be an integer > 0, else Calci displays #NULL error message. | ||
+ | *If <math>snum</math> > 'length of text', Calci displays #N/A error message. | ||
+ | *If string specified in <math>otext</math> is not a part of the reference string <math>txt</math>, Calci returns #N/A error string. | ||
− | + | == Examples == | |
− | |||
− | |||
− | + | <div id="6SpaceContent" class="zcontent" align="left"> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | <div id=" | ||
{| id="TABLE3" class="SpreadSheet blue" | {| id="TABLE3" class="SpreadSheet blue" | ||
|- class="even" | |- class="even" | ||
− | | class=" " | | + | | class="ssh1_f" |SEARCH |
− | | | + | | class=" " | |
− | | class=" " | | + | | class=" " | |
− | + | ||
− | |||
|- class="odd" | |- class="odd" | ||
− | | class=" " | | + | | class="ssh1_f" |Happy New Year!!! |
− | | class=" " | | + | | class=" " | |
− | | class=" | + | | class=" " | |
− | | | + | |
− | |||
|- class="even" | |- class="even" | ||
− | | class=" | + | | class="ssh1_f" | |
− | | class=" | + | | class=" " | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | | ||
| class=" " | | | class=" " | | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
− | + | =SEARCH("A", A1) : Returns '''3''' as output. | |
− | + | =SEARCH("New", A2) : Returns '''7''' as output. Space character is also counted. | |
+ | =SEARCH("Year",A2,6) : Search is started from 6th position. Returns '''11''' as output. <br />Space character is also counted. | ||
+ | |||
+ | == See Also == | ||
+ | |||
+ | *[[Manuals/calci/REPLACE | REPLACE]] | ||
+ | *[[Manuals/calci/REPT | REPT]] | ||
+ | |||
+ | ==References== | ||
+ | |||
+ | *[http://en.wikipedia.org/wiki/Autocorrection Find and Replace] |
Revision as of 06:29, 11 February 2014
SEARCH(ftext, otext, snum)
where
- is the text to search in original string,
- is the original string from which mentioned text is to be searched, and
- is an optional argument that specifies the character position to start the search.
SEARCH() identifies the occurrence of specified text string from the original string and returns the starting position of the matched string.
Description
SEARCH(ftext, otext, snum)
For Example,
SEARCH("COME", "WELCOME",1) returns 4
- SEARCH function can be used to find text within a text. SEARCH counts 1 byte per characters. MID works with the languages that use 'Single Byte Character Set' (SBCS).
- can be any string containing characters, numbers, symbols, blank spaces etc.
- and when directly entered in the command, should be enclosed in double quotes (e.g. "Name").
- Argument is optional. If omitted, Calci assumes to be 1.
- should be an integer > 0, else Calci displays #NULL error message.
- If > 'length of text', Calci displays #N/A error message.
- If string specified in is not a part of the reference string , Calci returns #N/A error string.
Examples
SEARCH | ||
Happy New Year!!! | ||
=SEARCH("A", A1) : Returns 3 as output. =SEARCH("New", A2) : Returns 7 as output. Space character is also counted. =SEARCH("Year",A2,6) : Search is started from 6th position. Returns 11 as output.
Space character is also counted.