SEARCH Function

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)
 
J

Jacob Skaria

=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
 
J

JoeU2004

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 -----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top