Syntax
=SEARCHB(find_text, within_text, [start_num])Arguments
| Argument | Required | Description |
|---|---|---|
find_text | Required | The text to find (? matches one character, * any run, ~ escapes them) |
within_text | Required | The text to search in |
start_num | Optional | Position to start searching from (1 when left out) |
How to use SEARCHB
SEARCHB is kept so older workbooks keep working. It calculates the same way as SEARCH, which is the name to use in new formulas.
SEARCHB takes 2 required arguments and 1 optional argument. Type =SEARCHB( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=SEARCH("e", "Statements", 6)Result =SEARCH("margin", "Profit Margin")Result =SEARCH("p?o", "Profit")Result Related text functions
- REPTRepeats text a given number of times.
- RIGHTReturns the last characters of a text.
- RIGHTBSame as RIGHT, counting bytes; without a double byte language set as default each character counts as one byte.
- SEARCHReturns the position of one text inside another, ignoring case. Accepts the wildcards ? and *.
- SPLITSplits text at a delimiter into a row of cells.
- SUBSTITUTEReplaces existing text with new text, everywhere or only in one occurrence.
- TReturns the value if it is text, otherwise empty text.
- TEXTFormats a number as text with a number format code, like "$#,##0.00" or "yyyy-mm-dd".
- TEXTAFTERReturns the text that comes after a delimiter.