Function Search()

Search()

This function returns the position at which a specified substring (character or a set of characters) is first found. Note that it returns position of the first occurence of the substring. This function is a non-case sensitive function, i.e. it considers 'E' and 'e' as same


Syntax:

= Search (Substring, Base_string, Start_pos)

Substrin = Is the string that is to be found within the Base String
Base_string = The string from which the substring is to bea searched / located
Start_pos = Position within the Base String from where the search should start finding


Example:

  • = Search ("E", "Excel Matic", 1) - result will be - 1
  • = Search ("m", "Excel Matic", 1) - result will be - 7
  • = Search ("E", "Excel Matic", 2) - result will be - 4 (though we started finding 'e' from second position, but the functions returns the position relative to original string, without ignoring the initials characters)
  • = Search (" ", "Excel Matic", 1) - result will be - 6 (Spaces, special characters can also be found using this function)
  • = Search ("E", "Excel Matic", 20) - result will be - #VALUE! (This will return an error as it is not able to find 'E' beyond the original length of the text)
  • = Search ("G", "Excel Matic", 1) - result will be - #VALUE! (This will return an error as it is not able to find 'G' which is not present in the Base String)
Share on Google Plus

About Dhakkanz

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

Sunday, June 21, 2009

Function Search()

Search()

This function returns the position at which a specified substring (character or a set of characters) is first found. Note that it returns position of the first occurence of the substring. This function is a non-case sensitive function, i.e. it considers 'E' and 'e' as same


Syntax:

= Search (Substring, Base_string, Start_pos)

Substrin = Is the string that is to be found within the Base String
Base_string = The string from which the substring is to bea searched / located
Start_pos = Position within the Base String from where the search should start finding


Example:

  • = Search ("E", "Excel Matic", 1) - result will be - 1
  • = Search ("m", "Excel Matic", 1) - result will be - 7
  • = Search ("E", "Excel Matic", 2) - result will be - 4 (though we started finding 'e' from second position, but the functions returns the position relative to original string, without ignoring the initials characters)
  • = Search (" ", "Excel Matic", 1) - result will be - 6 (Spaces, special characters can also be found using this function)
  • = Search ("E", "Excel Matic", 20) - result will be - #VALUE! (This will return an error as it is not able to find 'E' beyond the original length of the text)
  • = Search ("G", "Excel Matic", 1) - result will be - #VALUE! (This will return an error as it is not able to find 'G' which is not present in the Base String)

Function Search()SocialTwist Tell-a-Friend

0 comments:

Post a Comment