Difference between revisions of "Manuals/calci/SEARCHB"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"> '''SEARCHB'''(Text,Within_text, Start_num) where, '''Text''' - is the text string to extract. '''Within_te...")
 
Line 1: Line 1:
<div id="6SpaceContent" class="zcontent" align="left">
+
=SEARCHB(ftext, otext, snum)=
  
'''SEARCHB'''(Text,Within_text, Start_num)
+
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.
  
where,
+
SEARCHB() identifies the occurrence of specified text string from the original string and returns the starting position of the matched string.
  
'''Text''' - is the text string to extract.
+
== Description ==
  
'''Within_text'''- represents the text, find from Text.
+
SEARCHB(ftext, otext, snum)
  
'''Start_num''' - the character number in Within_text to start.
+
For Example,
  
</div>
+
SEARCHB("C", "WELCOME",1) returns ''4''
----
 
<div id="1SpaceContent" class="zcontent" align="left">
 
  
SEARCHB locate one text string within a second text string, and returns the number of the starting position of the first string from the first character of the second text string. SEARCHB is intended for use with languages that use the double-byte character set (DBCS).
+
*SEARCHB function can be used to find text within a text. SEARCHB counts 2 bytes per character. SEARCHB is intended for languages that use double-byte character set (DBCS).
 +
*<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 &gt; 0, else Calci displays #NULL error message.
 +
*If <math>snum</math> &gt; '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.
 +
*SEARCHB function is not case sensitive.
  
</div>
+
== Examples ==
----
 
<div id="7SpaceContent" class="zcontent" align="left">
 
  
If Start_num &lt; 0, SEARCHB returns #ERROR.
+
<div id="6SpaceContent" class="zcontent" align="left">
  
If Start_num  &gt; length of Text, SEARCHB returns #ERROR.
+
{| id="TABLE3" class="SpreadSheet blue"
 +
|- class="even"
 +
| class="ssh1_f" |JOHN SMITH
 +
| class="  " |
 +
| class="  " |
  
If Within_text not found , it returns #ERROR.
+
|- class="odd"
 +
| class="ssh1_f" |<#>!!!
 +
| class="  " |
 +
| class="  " |
  
If Start_num  not defined then it returns the length of Text.
+
|- class="even"
 +
| class="ssh1_f" |
 +
| class="  " |
 +
| class="  " |
  
</div>
+
|}
----
 
<div id="12SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="left">
 
 
 
SEARCHB
 
 
 
</div></div>
 
----
 
<div id="8SpaceContent" class="zcontent" align="left">
 
 
 
Lets see an example in (Column1, Row2)
 
 
 
<nowiki>=SEARCHB("S", R1C1, 3)</nowiki>
 
 
 
SEARCHB returns 6.
 
 
 
Lets see an another example in (Column1,Row3)
 
 
 
<nowiki>=SEARCHB("I",R1C1)</nowiki>
 
 
 
SEARCHB returns 8.
 
  
Consider an example in (Column1, Row4)
+
=SEARCHB("I", A1) : Returns '''8''' as output.
 +
=SEARCHB(">", A2) : Returns '''3''' as output.
  
<nowiki>=SEARCHB("b",R1C1)</nowiki>
+
<font color ="Red">Need to give examples with characters/language supporting DBCS </font>
 +
== See Also ==
  
SEARCHB returns #ERROR(TEXT not found).
+
*[[Manuals/calci/SEARCH | SEARCH]]
 +
*[[Manuals/calci/REPLACEB | REPLACEB]]
  
</div>
 
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Syntax </div><div class="ZEditBox"><center></center></div></div>
 
----
 
<div id="4SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Remarks </div></div>
 
----
 
<div id="3SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Examples </div></div>
 
----
 
<div id="11SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Description </div></div>
 
----
 
<div id="2SpaceContent" class="zcontent" align="left">
 
  
{| id="TABLE3" class="SpreadSheet blue"
+
==References==
|+ Default Calci
 
|- class="even"
 
| class=" " |
 
| Column1
 
| Column2
 
| Column3
 
| Column4
 
|- class="odd"
 
| class=" " | Row1
 
| class=" " | JOHN SMITH
 
| class=" " |
 
|
 
|
 
|- class="even"
 
| class="  " | Row2
 
| class="sshl_f" | 6
 
|
 
|
 
|
 
|- class="odd"
 
| Row3
 
| class="sshl_f      " | 8
 
|
 
|
 
|
 
|- class="even"
 
| Row4
 
| class="sshl_f" | #ERROR
 
|
 
|
 
|
 
|- class="odd"
 
| class=" " | Row5
 
| class="                    SelectTD1 ChangeBGColor SelectTD1" |
 
<div id="2Space_Handle" class="zhandles" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="2Space_Copy" class="zhandles" title="Click and Drag over to AutoFill other cells."></div><div id="2Space_Drag" class="zhandles" title="Click and Drag to Move/Copy Area.">[[Image:copy-cube.gif]]  </div>
 
|
 
|
 
|
 
|- class="even"
 
| Row6
 
|
 
|
 
|
 
|
 
|}
 
 
 
{| id="TABLE3_menu"
 
| align="right" | TABLE3
 
| <span align="left">[[Image:calci1.gif]]</span>
 
|
 
|
 
[[Image:bold.gif]]
 
|
 
[[Image:italic.gif]]
 
|
 
[[Image:normal.gif]]
 
|
 
[[Image:underline.gif]]
 
|
 
[[Image:border.gif]]
 
|
 
[[Image:numbers.gif]]
 
|
 
[[Image:sort.gif]]
 
|
 
[[Image:formatcells.gif]]
 
|
 
[[Image:graphs.gif]]
 
| $
 
|}
 
  
</div>
+
*[http://en.wikipedia.org/wiki/Autocorrection Find and Replace]
----
 

Revision as of 11:01, 11 February 2014

SEARCHB(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.

SEARCHB() identifies the occurrence of specified text string from the original string and returns the starting position of the matched string.

Description

SEARCHB(ftext, otext, snum)

For Example,

SEARCHB("C", "WELCOME",1) returns 4

  • SEARCHB function can be used to find text within a text. SEARCHB counts 2 bytes per character. SEARCHB is intended for languages that use double-byte character set (DBCS).
  • 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.
  • SEARCHB function is not case sensitive.

Examples

JOHN SMITH
<#>!!!
=SEARCHB("I", A1) : Returns 8 as output.
=SEARCHB(">", A2) : Returns 3 as output. 

Need to give examples with characters/language supporting DBCS

See Also


References