SEARCHB
Supported, behaves as documentedCategory: Text · Last tested 2026-09-01
Real compatibility results for the SEARCHB function: executed in Excel for the web, Google Sheets and LibreOffice Calc, with desktop Excel behavior from Microsoft’s official documentation (we do not run desktop Excel — Excel for the web is a different application and is executed separately). Syntax and links to that documentation are below.
Support matrix
| Engine | Documented | Live-tested | Verdict |
|---|---|---|---|
| Excel (desktop) | Yes | No — documented only | n/a |
| Excel for the web | — | Yes (recalc, 2026-09-01) | Supported, behaves as documented |
| Google Sheets | Yes | Yes (Drive import, 2026-08-31) | Supported, behaves as documented |
| LibreOffice Calc | No | Yes (25.8.7.3, 2026-08-31) | Supported, behaves as documented |
LibreOffice version history
We executed the same test cases under each LibreOffice release to show exactly when SEARCHB’s support changed — not documentation claims, real results.
| LibreOffice version | Verdict | Tested |
|---|---|---|
| 24.2.0.3 | Supported, behaves as documented | 2026-08-31 |
| 24.8.7.2 | Supported, behaves as documented | 2026-08-31 |
| 25.2.0.3 | Supported, behaves as documented | 2026-08-31 |
| 25.8.7.3 | Supported, behaves as documented | 2026-08-31 |
Executed test cases
Excel for the web (executed 2026-09-01 via OneDrive recalculation)
These values come from Excel for the web, not from desktop Excel. They are two different implementations of the calculation engine, and this run measured only the web one: the corpus was uploaded to OneDrive as .xlsx, recalculated by Excel for the web on open, and downloaded again for readback. Excel for the web is a rolling service with no pinnable version, so the run is identified by its date. Where a value here disagrees with the Expected column — which is Microsoft’s documentation of the desktop product — we cannot tell you whether the web engine diverges from the desktop one or the documentation is wrong about both, because we do not run desktop Excel.
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =SEARCHB("e",A2,6) | Microsoft's documented SEARCH example with a start position, on ASCII where bytes are characters | 7 | 7ProvenanceThe SEARCH page publishes =SEARCH("e",A2,6) = 7 for A2 = "Statements" ("Position of the first 'e' in the string, starting the search at the sixth character"). "Statements" is pure ASCII, so a search over BYTES from byte six lands on the same position a search over characters does. SEARCHB HAS NO PAGE OF ITS OWN, AND THE PAGE THAT USED TO DOCUMENT IT NO LONGER DOES -- see SEARCHB_documentation_has_been_withdrawn for the full finding. Microsoft's page was read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/search-function. FETCH NOTE FOR THIS BATCH: batch F recorded every /en-us/office/<name>-function-<guid> URL returning Microsoft's 'Sorry, the page you're looking for can't be found' body; today BOTH paths serve the article again -- the GUID form redirects to /en-us/excel/functions/<slug>-function -- and every page cited in this batch came back complete (217-223 KB) in one or two attempts, with no 87 KB stub responses. Nothing here is sourced from a search snippet or a mirror. |
Matched |
| =SEARCHB(A4,A3) | Microsoft's second documented row: the search string taken from a cell, case-insensitively | 8 | 8ProvenanceThe SEARCH page publishes =SEARCH(A4,A3) = 8 for A4 = "margin" and A3 = "Profit Margin". The match is case-insensitive -- the page's Remarks say "SEARCH... do not distinguish between uppercase and lowercase letters" -- so lowercase "margin" finds "Margin" at position 8. Pure ASCII again, so bytes and characters coincide. |
Matched |
| =SEARCHB("e",A2) | The start argument omitted, which the page says defaults to 1 | 5 | 5ProvenanceThe Remarks publish: "If start_num is omitted, it is assumed to be 1." "Statements" has its first "e" at position 5, which is why the documented row above passes 6 to skip it and find the second one at 7. The pair together prove the start argument is honoured rather than ignored. |
Matched |
| =SEARCHB("zzz",A2) | A string that does not occur, which the page assigns an error code | #VALUE! | #VALUE!ProvenanceThe Remarks publish: "If find_text is not found, the #VALUE! error value is returned." |
Matched |
| =SEARCHB("e",A2,99) | A start position past the end of the text, which the page excludes | #VALUE! | #VALUE!ProvenanceThe Remarks publish: "If start_num is not greater than 0 or is greater than the length of within_text, the #VALUE! error value is returned." "Statements" is ten characters, so 99 is outside the documented range. |
Matched |
| =SEARCHB("?argin",A3) | The single-character wildcard the page documents | 8 | 8ProvenanceThe Remarks publish that SEARCH supports wildcards: "You can use the wildcard characters -- the question mark (?) and asterisk (*) -- in find_text. A question mark matches any single character; an asterisk matches any sequence of characters." "?argin" therefore matches "Margin" in "Profit Margin" at position 8, the same position the literal search finds. This case is what distinguishes SEARCHB from FINDB, whose page documents no wildcards at all. |
Matched |
| =SEARCHB("B","ABC") | Full-width (double-byte) characters, where byte and character counting diverge | 2 | ProvenanceDELIBERATELY ASSERTS NOTHING, for the reason the LEFTB, MIDB, REPLACEB and RIGHTB files give: byte counting in the B functions historically applied only when the default language was a DBCS language, this harness runs under en_US.UTF-8, and there is now NO Microsoft documentation of SEARCHB's byte behaviour at all to hold an engine to. Under DBCS rules the second full-width character starts at BYTE 3; under character rules it is at position 2. The case records what each engine returns rather than scoring it. |
Ran OK |
| =SEARCHB("a","a") | A trivially true search, carrying this batch's finding that SEARCHB's documentation has been withdrawn | 1 | 1ProvenanceTHE ASSERTION IS TRIVIAL AND THE NOTE IS THE POINT. Searching for "a" in "a" is position 1 under byte counting and character counting alike, so the value cannot be controversial; the case exists to carry a documentation finding made on 2026-08-31. SEARCHB HAS NO PAGE OF ITS OWN: /en-us/excel/functions/searchb-function, search-searchb-functions, search-searchb-function, searchb-functions and search-and-searchb-functions were each requested six times and returned HTTP 404 every time, and the function index's left-hand navigation has no SEARCHB entry. It used to be documented on the combined "SEARCH, SEARCHB functions" page, and that page still ANSWERS to SEARCHB -- the context-sensitive help IDs SEARCHB and XLWAEnduser_SEARCHB resolve to it, and its own HTML head meta description still publishes "Syntax: SEARCH(find_text,within_text,[start_num]) SEARCHB(find_text,within_text,[start_num])" -- but THE LIVE ARTICLE BODY HAS BEEN REWRITTEN TO SEARCH ONLY. There is no SEARCHB syntax line, no SEARCHB argument list, and the double-byte remarks are gone: the strings "double-byte" and "DBCS" appear zero times in the article. What survives is an Important box reading "The SEARCHB function is deprecated." Every SEARCHB case in this file therefore cites the SEARCH page and asserts only what holds for pure ASCII, where the two functions must agree; nothing here is asserted about byte semantics, because Microsoft no longer publishes any. |
Matched |
Google Sheets (executed 2026-08-31 via Drive import)
Google Sheets is a rolling service with no pinnable version, so this run is identified by its date. The corpus was imported to Drive as .xlsx, recalculated by Sheets, and exported back for readback.
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =SEARCHB("e",A2,6) | Microsoft's documented SEARCH example with a start position, on ASCII where bytes are characters | 7 | 7ProvenanceThe SEARCH page publishes =SEARCH("e",A2,6) = 7 for A2 = "Statements" ("Position of the first 'e' in the string, starting the search at the sixth character"). "Statements" is pure ASCII, so a search over BYTES from byte six lands on the same position a search over characters does. SEARCHB HAS NO PAGE OF ITS OWN, AND THE PAGE THAT USED TO DOCUMENT IT NO LONGER DOES -- see SEARCHB_documentation_has_been_withdrawn for the full finding. Microsoft's page was read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/search-function. FETCH NOTE FOR THIS BATCH: batch F recorded every /en-us/office/<name>-function-<guid> URL returning Microsoft's 'Sorry, the page you're looking for can't be found' body; today BOTH paths serve the article again -- the GUID form redirects to /en-us/excel/functions/<slug>-function -- and every page cited in this batch came back complete (217-223 KB) in one or two attempts, with no 87 KB stub responses. Nothing here is sourced from a search snippet or a mirror. |
Matched |
| =SEARCHB(A4,A3) | Microsoft's second documented row: the search string taken from a cell, case-insensitively | 8 | 8ProvenanceThe SEARCH page publishes =SEARCH(A4,A3) = 8 for A4 = "margin" and A3 = "Profit Margin". The match is case-insensitive -- the page's Remarks say "SEARCH... do not distinguish between uppercase and lowercase letters" -- so lowercase "margin" finds "Margin" at position 8. Pure ASCII again, so bytes and characters coincide. |
Matched |
| =SEARCHB("e",A2) | The start argument omitted, which the page says defaults to 1 | 5 | 5ProvenanceThe Remarks publish: "If start_num is omitted, it is assumed to be 1." "Statements" has its first "e" at position 5, which is why the documented row above passes 6 to skip it and find the second one at 7. The pair together prove the start argument is honoured rather than ignored. |
Matched |
| =SEARCHB("zzz",A2) | A string that does not occur, which the page assigns an error code | #VALUE! | #VALUE!ProvenanceThe Remarks publish: "If find_text is not found, the #VALUE! error value is returned." |
Matched |
| =SEARCHB("e",A2,99) | A start position past the end of the text, which the page excludes | #VALUE! | #VALUE!ProvenanceThe Remarks publish: "If start_num is not greater than 0 or is greater than the length of within_text, the #VALUE! error value is returned." "Statements" is ten characters, so 99 is outside the documented range. |
Matched |
| =SEARCHB("?argin",A3) | The single-character wildcard the page documents | 8 | 8ProvenanceThe Remarks publish that SEARCH supports wildcards: "You can use the wildcard characters -- the question mark (?) and asterisk (*) -- in find_text. A question mark matches any single character; an asterisk matches any sequence of characters." "?argin" therefore matches "Margin" in "Profit Margin" at position 8, the same position the literal search finds. This case is what distinguishes SEARCHB from FINDB, whose page documents no wildcards at all. |
Matched |
| =SEARCHB("B","ABC") | Full-width (double-byte) characters, where byte and character counting diverge | 3 | ProvenanceDELIBERATELY ASSERTS NOTHING, for the reason the LEFTB, MIDB, REPLACEB and RIGHTB files give: byte counting in the B functions historically applied only when the default language was a DBCS language, this harness runs under en_US.UTF-8, and there is now NO Microsoft documentation of SEARCHB's byte behaviour at all to hold an engine to. Under DBCS rules the second full-width character starts at BYTE 3; under character rules it is at position 2. The case records what each engine returns rather than scoring it. |
Ran OK |
| =SEARCHB("a","a") | A trivially true search, carrying this batch's finding that SEARCHB's documentation has been withdrawn | 1 | 1ProvenanceTHE ASSERTION IS TRIVIAL AND THE NOTE IS THE POINT. Searching for "a" in "a" is position 1 under byte counting and character counting alike, so the value cannot be controversial; the case exists to carry a documentation finding made on 2026-08-31. SEARCHB HAS NO PAGE OF ITS OWN: /en-us/excel/functions/searchb-function, search-searchb-functions, search-searchb-function, searchb-functions and search-and-searchb-functions were each requested six times and returned HTTP 404 every time, and the function index's left-hand navigation has no SEARCHB entry. It used to be documented on the combined "SEARCH, SEARCHB functions" page, and that page still ANSWERS to SEARCHB -- the context-sensitive help IDs SEARCHB and XLWAEnduser_SEARCHB resolve to it, and its own HTML head meta description still publishes "Syntax: SEARCH(find_text,within_text,[start_num]) SEARCHB(find_text,within_text,[start_num])" -- but THE LIVE ARTICLE BODY HAS BEEN REWRITTEN TO SEARCH ONLY. There is no SEARCHB syntax line, no SEARCHB argument list, and the double-byte remarks are gone: the strings "double-byte" and "DBCS" appear zero times in the article. What survives is an Important box reading "The SEARCHB function is deprecated." Every SEARCHB case in this file therefore cites the SEARCH page and asserts only what holds for pure ASCII, where the two functions must agree; nothing here is asserted about byte semantics, because Microsoft no longer publishes any. |
Matched |
LibreOffice Calc 25.8.7.3 (tested 2026-08-31)
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =SEARCHB("e",A2,6) | Microsoft's documented SEARCH example with a start position, on ASCII where bytes are characters | 7 | 7ProvenanceThe SEARCH page publishes =SEARCH("e",A2,6) = 7 for A2 = "Statements" ("Position of the first 'e' in the string, starting the search at the sixth character"). "Statements" is pure ASCII, so a search over BYTES from byte six lands on the same position a search over characters does. SEARCHB HAS NO PAGE OF ITS OWN, AND THE PAGE THAT USED TO DOCUMENT IT NO LONGER DOES -- see SEARCHB_documentation_has_been_withdrawn for the full finding. Microsoft's page was read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/search-function. FETCH NOTE FOR THIS BATCH: batch F recorded every /en-us/office/<name>-function-<guid> URL returning Microsoft's 'Sorry, the page you're looking for can't be found' body; today BOTH paths serve the article again -- the GUID form redirects to /en-us/excel/functions/<slug>-function -- and every page cited in this batch came back complete (217-223 KB) in one or two attempts, with no 87 KB stub responses. Nothing here is sourced from a search snippet or a mirror. |
Matched |
| =SEARCHB(A4,A3) | Microsoft's second documented row: the search string taken from a cell, case-insensitively | 8 | 8ProvenanceThe SEARCH page publishes =SEARCH(A4,A3) = 8 for A4 = "margin" and A3 = "Profit Margin". The match is case-insensitive -- the page's Remarks say "SEARCH... do not distinguish between uppercase and lowercase letters" -- so lowercase "margin" finds "Margin" at position 8. Pure ASCII again, so bytes and characters coincide. |
Matched |
| =SEARCHB("e",A2) | The start argument omitted, which the page says defaults to 1 | 5 | 5ProvenanceThe Remarks publish: "If start_num is omitted, it is assumed to be 1." "Statements" has its first "e" at position 5, which is why the documented row above passes 6 to skip it and find the second one at 7. The pair together prove the start argument is honoured rather than ignored. |
Matched |
| =SEARCHB("zzz",A2) | A string that does not occur, which the page assigns an error code | #VALUE! | #VALUE!ProvenanceThe Remarks publish: "If find_text is not found, the #VALUE! error value is returned." |
Matched |
| =SEARCHB("e",A2,99) | A start position past the end of the text, which the page excludes | #VALUE! | #VALUE!ProvenanceThe Remarks publish: "If start_num is not greater than 0 or is greater than the length of within_text, the #VALUE! error value is returned." "Statements" is ten characters, so 99 is outside the documented range. |
Matched |
| =SEARCHB("?argin",A3) | The single-character wildcard the page documents | 8 | 8ProvenanceThe Remarks publish that SEARCH supports wildcards: "You can use the wildcard characters -- the question mark (?) and asterisk (*) -- in find_text. A question mark matches any single character; an asterisk matches any sequence of characters." "?argin" therefore matches "Margin" in "Profit Margin" at position 8, the same position the literal search finds. This case is what distinguishes SEARCHB from FINDB, whose page documents no wildcards at all. |
Matched |
| =SEARCHB("B","ABC") | Full-width (double-byte) characters, where byte and character counting diverge | 3 | ProvenanceDELIBERATELY ASSERTS NOTHING, for the reason the LEFTB, MIDB, REPLACEB and RIGHTB files give: byte counting in the B functions historically applied only when the default language was a DBCS language, this harness runs under en_US.UTF-8, and there is now NO Microsoft documentation of SEARCHB's byte behaviour at all to hold an engine to. Under DBCS rules the second full-width character starts at BYTE 3; under character rules it is at position 2. The case records what each engine returns rather than scoring it. |
Ran OK |
| =SEARCHB("a","a") | A trivially true search, carrying this batch's finding that SEARCHB's documentation has been withdrawn | 1 | 1ProvenanceTHE ASSERTION IS TRIVIAL AND THE NOTE IS THE POINT. Searching for "a" in "a" is position 1 under byte counting and character counting alike, so the value cannot be controversial; the case exists to carry a documentation finding made on 2026-08-31. SEARCHB HAS NO PAGE OF ITS OWN: /en-us/excel/functions/searchb-function, search-searchb-functions, search-searchb-function, searchb-functions and search-and-searchb-functions were each requested six times and returned HTTP 404 every time, and the function index's left-hand navigation has no SEARCHB entry. It used to be documented on the combined "SEARCH, SEARCHB functions" page, and that page still ANSWERS to SEARCHB -- the context-sensitive help IDs SEARCHB and XLWAEnduser_SEARCHB resolve to it, and its own HTML head meta description still publishes "Syntax: SEARCH(find_text,within_text,[start_num]) SEARCHB(find_text,within_text,[start_num])" -- but THE LIVE ARTICLE BODY HAS BEEN REWRITTEN TO SEARCH ONLY. There is no SEARCHB syntax line, no SEARCHB argument list, and the double-byte remarks are gone: the strings "double-byte" and "DBCS" appear zero times in the article. What survives is an Important box reading "The SEARCHB function is deprecated." Every SEARCHB case in this file therefore cites the SEARCH page and asserts only what holds for pure ASCII, where the two functions must agree; nothing here is asserted about byte semantics, because Microsoft no longer publishes any. |
Matched |
Docs & syntax
- Excel (desktop): official documentation
- Google Sheets: official documentation
Where SEARCHB behaves differently
- LENB and CJK text: 4 in Sheets and LibreOffice, 2 in Excel for the web
Microsoft's archived LEN/LENB page says LENB counts 2 bytes per character only under a DBCS default language, otherwise 1. Executed under a non-DBCS locale, =LENB("日本") returned 4 in Google Sheets and all four LibreOffice builds - but 2, the documented answer, in Excel for the web. Desktop Excel stays documentation only.