SEARCH Function

  • Thread starter Thread starter nc
  • Start date Start date
N

nc

G2= 040203 De La Conjo MF 3000 Basic Pay

=SEARCH({0,1,2,3,4,5,6,7,8,9},G2,6)

When I use the above formula to search the the following numbers and it
returns a value.


Why I get an error when I change the formula to,

=SEARCH({1000,3000},G2,6)
 
=SEARCH({0,1,2,3,4,5,6,7,8,9},G2,6)
returns the position of 1st zero found in the string starting from the 6 th
character

=SEARCH({1000,3000},G2,6)
returns an error because 1000 is not to be found in the string

=SEARCH({3000,1000},G2,6)
will return the position of 3000 in the string

If this post helps click Yes
 
SEARCH({0,1,2,3,4,5,6,7,8,9},G2,6) works by coincidence because there is a
"0" in the string starting in the 6th position.

SEARCH({1000,3000},G2,6) fails because "1000" does not appear in the string
starting in the 6th position.

But these are the wrong form to use for your purposes anyway. You have
taken your question out of its original context. See your thread "Text
function" for solutions to your search problem.


----- original message -----
 
Back
Top