<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Practicalcode</id>
	<title>Apache OpenOffice Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Practicalcode"/>
	<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/wiki/Special:Contributions/Practicalcode"/>
	<updated>2026-05-09T09:16:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:Documentation/How_Tos/Calc:_SEARCH_function&amp;diff=194163</id>
		<title>Talk:Documentation/How Tos/Calc: SEARCH function</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:Documentation/How_Tos/Calc:_SEARCH_function&amp;diff=194163"/>
		<updated>2011-02-18T02:37:59Z</updated>

		<summary type="html">&lt;p&gt;Practicalcode: Case Rationale and theoretical discussion of result type/value.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I added the &amp;#039;not found&amp;#039; case because I think it is essential to understanding the FIND() &amp;amp;&amp;amp; SEARCH() functions.  I elaborate further in the forum that caused me to explore the answer for my own purposes:&lt;br /&gt;
[http://user.services.openoffice.org/en/forum/viewtopic.php?f=9&amp;amp;t=29701&amp;amp;start=0&amp;amp;sid=fe3fe5e9b27e6666f4bc7fac5973549d How to avoid #VALUE!]&lt;br /&gt;
&lt;br /&gt;
I would like to re-iterate however, that I believe the definition of the function should be redefined.   If I were defining the function, my vote would be for it to return 0 and not #VALUE!.  I think #VALUE! is misused in this instance.  All of the arguments were legal, the substring simply did not exist.&lt;br /&gt;
&lt;br /&gt;
(&amp;lt; Though, I do understand the difficulty of doing so at this point with the potential of &amp;#039;breaking&amp;#039; existing spreadsheets that use the ISNUMBER() work around...  so perhaps in hindsight I should have abdicated the use of ISERROR() even with the reverse logic?...  Perhaps we need an ISVALID() function which is defined as NOT ISERROR() &amp;gt;)&lt;br /&gt;
&lt;br /&gt;
If someone knows of the decision process / rationale behind returning #VALUE! for the FIND() &amp;amp;&amp;amp; SEARCH() functions, pls feel free to enlighten me with an e-mail.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--PracticalCode&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These examples are a little facile for me. I&amp;#039;m trying to figure out whether it&amp;#039;s possible to SEARCH( &amp;quot;text_to_find&amp;quot;, MyOtherSheet!NamedRange ) -- that is, search a range of cells for the needle, and if so, how to refer to the  named range. (Question from a newbie spreadsheet user / engineering type.)&lt;br /&gt;
&lt;br /&gt;
-- LNBEL&lt;br /&gt;
&lt;br /&gt;
: Probably better asked in the forums [http://user.services.openoffice.org/en/forum/index.php Open Office Community Forum] esp in hindsight considering noone has responded since 17 February 2010 according to the history.&lt;br /&gt;
: That aside, I would suppose I&amp;#039;d ask what the purpose of finding the location of the &amp;#039;1st&amp;#039; instance of a substring in a range would be?..  If you simply needed to know if it existed or not, then COUNTIF() would work; SUMIF() for a conditional totaling...&lt;br /&gt;
: --PracticalCode&lt;/div&gt;</summary>
		<author><name>Practicalcode</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Talk:Documentation/How_Tos/Calc:_FIND_function&amp;diff=194162</id>
		<title>Talk:Documentation/How Tos/Calc: FIND function</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Talk:Documentation/How_Tos/Calc:_FIND_function&amp;diff=194162"/>
		<updated>2011-02-18T02:19:07Z</updated>

		<summary type="html">&lt;p&gt;Practicalcode: Case Rationale and theoretical discussion of result type/value.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I added the &amp;#039;not found&amp;#039; case because I think it is essential to understanding the FIND() &amp;amp;&amp;amp; SEARCH() functions.  I elaborate further in the forum that caused me to explore the answer for my own purposes:&lt;br /&gt;
[http://user.services.openoffice.org/en/forum/viewtopic.php?f=9&amp;amp;t=29701&amp;amp;start=0&amp;amp;sid=fe3fe5e9b27e6666f4bc7fac5973549d How to avoid #VALUE!]&lt;br /&gt;
&lt;br /&gt;
I would like to re-iterate however, that I believe the definition of the function should be redefined.   If I were defining the function, my vote would be for it to return 0 and not #VALUE!.  I think #VALUE! is misused in this instance.  All of the arguments were legal, the substring simply did not exist.&lt;br /&gt;
&lt;br /&gt;
(&amp;lt; Though, I do understand the difficulty of doing so at this point with the potential of &amp;#039;breaking&amp;#039; existing spreadsheets that use the ISNUMBER() work around...  so perhaps in hindsight I should have abdicated the use of ISERROR() even with the reverse logic?...  Perhaps we need an ISVALID() function which is defined as NOT ISERROR() &amp;gt;)&lt;br /&gt;
&lt;br /&gt;
If someone knows of the decision process / rationale behind returning #VALUE! for the FIND() &amp;amp;&amp;amp; SEARCH() functions, pls feel free to enlighten me with an e-mail.&lt;/div&gt;</summary>
		<author><name>Practicalcode</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_SEARCH_function&amp;diff=194161</id>
		<title>Documentation/How Tos/Calc: SEARCH function</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_SEARCH_function&amp;diff=194161"/>
		<updated>2011-02-18T02:04:08Z</updated>

		<summary type="html">&lt;p&gt;Practicalcode: Added example to cover case where substring is not present.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
== SEARCH ==&lt;br /&gt;
Returns the position of a string of text within another string. &lt;br /&gt;
&lt;br /&gt;
=== Syntax: ===&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;SEARCH(findtext; texttosearch; startposition)&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
: returns the character position of the first occurrence of &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;findtext&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; within &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;texttosearch&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;startposition&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; (optional) is the position from which the search starts.&lt;br /&gt;
&lt;br /&gt;
: The search is &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; case-sensitive.&lt;br /&gt;
&lt;br /&gt;
: The search will use regular expressions, if they are enabled (&amp;#039;&amp;#039;&amp;#039;Tools - Options - OpenOffice.org Calc - Calculate&amp;#039;&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
: A failed search gives the &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;#VALUE!&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; error.&lt;br /&gt;
&lt;br /&gt;
: In &amp;#039;&amp;#039;&amp;#039;Tools - Options - OpenOffice.org Calc - Calculate&amp;#039;&amp;#039;&amp;#039; the setting for &amp;lt;i&amp;gt;Search criteria = and &amp;lt;&amp;gt;must apply to whole cells&amp;lt;/i&amp;gt; has no effect.&lt;br /&gt;
&lt;br /&gt;
=== Example: ===&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;SEARCH(&amp;quot;yo&amp;quot;; &amp;quot;Yoyo&amp;quot;)&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
: returns &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;1&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;. The search is case-insensitive.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;SEARCH(&amp;quot;cho&amp;quot;; &amp;quot;choochoo&amp;quot;; 2)&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
: returns &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;5&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;SEARCH(&amp;quot;t.n&amp;quot;; &amp;quot;often&amp;quot;)&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
: returns &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;3&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;, if regular expressions are enabled. The &amp;quot;.&amp;quot; stands for any single character in a regular expression, so &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;&amp;quot;t.n&amp;quot;&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; matches &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;&amp;quot;ten&amp;quot;&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;SEARCH(&amp;quot;xyz&amp;quot;,&amp;quot;abcdef&amp;quot;,1)&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
: returns &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;#VALUE!&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
: NOTE:  This is an error condition, which must be &amp;#039;handled&amp;#039; if used as the argument to another function.&lt;br /&gt;
: &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;IF( SEARCH(&amp;quot;xyz&amp;quot;,&amp;quot;abcdef&amp;quot;,1) , &amp;quot;Substring Present&amp;quot;, &amp;quot;ERR: Missing Substring&amp;quot; )&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
:: returns &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;#VALUE!&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; which is not very useful, therefore we could use either &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;ISERROR()&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;ISNUMBER()&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; for example:&lt;br /&gt;
:: &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;IF( ISERROR( SEARCH(&amp;quot;xyz&amp;quot;,&amp;quot;abcdef&amp;quot;,1) ) , &amp;quot;ERR: Missing Substring&amp;quot;, &amp;quot;Substring Present&amp;quot; )&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
::: returns &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;&amp;quot;ERR: Missing Substring&amp;quot;&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; (... allowing the IF() to function, and not propagating the error from the SEARCH() function.&lt;br /&gt;
:: &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;IF( ISNUMBER( SEARCH(&amp;quot;xyz&amp;quot;,&amp;quot;abcdef&amp;quot;,1) ) , &amp;quot;Substring Present&amp;quot;, &amp;quot;ERR: Missing Substring&amp;quot; )&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
::: returns &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;&amp;quot;ERR: Missing Substring&amp;quot;&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; (... allowing the IF() to function, and not propagating the error from the SEARCH() function.&lt;br /&gt;
:: NOTE:  In practice, it may be more maintainable to use ISNUMBER() to avoid negative logic, and it is more indicitive of the evaluation desired:  if the substring has a position, then ISNUMBER() is TRUE, else ISNUMBER() is FALSE.&lt;br /&gt;
{{Documentation/SeeAlso|&lt;br /&gt;
* [[Documentation/How_Tos/Calc: REPLACE function|REPLACE]]&lt;br /&gt;
* [[Documentation/How_Tos/Calc: FIND function|FIND]]&lt;br /&gt;
* [[Documentation/How_Tos/Calc: SUBSTITUTE function|SUBSTITUTE]]&lt;br /&gt;
* [[Documentation/How_Tos/Calc: EXACT function|EXACT]]&lt;br /&gt;
&lt;br /&gt;
* [[Documentation/How_Tos/Regular Expressions in Calc|Regular Expressions in Calc]]&lt;br /&gt;
&lt;br /&gt;
* [[Documentation/How_Tos/Calc: Text functions|Text functions]]&lt;br /&gt;
&lt;br /&gt;
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]&lt;br /&gt;
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}&lt;br /&gt;
[[Category: Documentation/Reference/Calc/Text functions]]&lt;/div&gt;</summary>
		<author><name>Practicalcode</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_FIND_function&amp;diff=194160</id>
		<title>Documentation/How Tos/Calc: FIND function</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_FIND_function&amp;diff=194160"/>
		<updated>2011-02-18T01:59:15Z</updated>

		<summary type="html">&lt;p&gt;Practicalcode: Added example to cover case where substring is not present.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
== FIND ==&lt;br /&gt;
Returns the position of a string of text within another string. &lt;br /&gt;
&lt;br /&gt;
=== Syntax: ===&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;FIND(findtext; texttosearch; startposition)&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
: returns the character position of the first occurrence of &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;findtext&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; within &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;texttosearch&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;startposition&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; (optional) is the position from which the search starts.&lt;br /&gt;
&lt;br /&gt;
: The search is case-sensitive.&lt;br /&gt;
&lt;br /&gt;
: A failed search gives the &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;#VALUE!&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; error.&lt;br /&gt;
&lt;br /&gt;
=== Example: ===&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;FIND(&amp;quot;yo&amp;quot;; &amp;quot;Yoyo&amp;quot;)&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
: returns &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;3&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;FIND(&amp;quot;cho&amp;quot;; &amp;quot;choochoo&amp;quot;; 2)&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
: returns &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;5&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;FIND(&amp;quot;xyz&amp;quot;,&amp;quot;abcdef&amp;quot;,1)&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
: returns &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;#VALUE!&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
: NOTE:  This is an error condition, which must be &amp;#039;handled&amp;#039; if used as the argument to another function.&lt;br /&gt;
: &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;IF( FIND(&amp;quot;xyz&amp;quot;,&amp;quot;abcdef&amp;quot;,1) , &amp;quot;Substring Present&amp;quot;, &amp;quot;ERR: Missing Substring&amp;quot; )&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
:: returns &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;#VALUE!&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; which is not very useful, therefore we could use either &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;ISERROR()&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;ISNUMBER()&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; for example:&lt;br /&gt;
:: &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;IF( ISERROR( FIND(&amp;quot;xyz&amp;quot;,&amp;quot;abcdef&amp;quot;,1) ) , &amp;quot;ERR: Missing Substring&amp;quot;, &amp;quot;Substring Present&amp;quot; )&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
::: returns &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;&amp;quot;ERR: Missing Substring&amp;quot;&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; (... allowing the IF() to function, and not propagating the error from the FIND() function.&lt;br /&gt;
:: &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;IF( ISNUMBER( FIND(&amp;quot;xyz&amp;quot;,&amp;quot;abcdef&amp;quot;,1) ) , &amp;quot;Substring Present&amp;quot;, &amp;quot;ERR: Missing Substring&amp;quot; )&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
::: returns &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;&amp;quot;ERR: Missing Substring&amp;quot;&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; (... allowing the IF() to function, and not propagating the error from the FIND() function.&lt;br /&gt;
:: NOTE:  In practice, it may be more maintainable to use ISNUMBER() to avoid negative logic, and it is more indicitive of the evaluation desired:  if the substring has a position, then ISNUMBER() is TRUE, else ISNUMBER() is FALSE.&lt;br /&gt;
&lt;br /&gt;
{{Documentation/SeeAlso|&lt;br /&gt;
* [[Documentation/How_Tos/Calc: REPLACE function|REPLACE]]&lt;br /&gt;
* [[Documentation/How_Tos/Calc: SEARCH function|SEARCH]]&lt;br /&gt;
* [[Documentation/How_Tos/Calc: SUBSTITUTE function|SUBSTITUTE]]&lt;br /&gt;
* [[Documentation/How_Tos/Calc: EXACT function|EXACT]]&lt;br /&gt;
&lt;br /&gt;
* [[Documentation/How_Tos/Calc: Text functions|Text functions]]&lt;br /&gt;
&lt;br /&gt;
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]&lt;br /&gt;
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}&lt;br /&gt;
[[Category: Documentation/Reference/Calc/Text functions]]&lt;/div&gt;</summary>
		<author><name>Practicalcode</name></author>
	</entry>
</feed>