findCells
Search for cells matching specified criteria within a sheet or range. Returns up to 200 matches. Use matchMode to control whether all criteria must match (AND, default) or any (OR). Range iteration is limited to 10,000 cells — use sheet scope for larger searches.
| Parameter | Type | Description | |
|---|---|---|---|
sheet | string | optional | Restrict search to a single sheet by name. |
range | string | optional | Restrict search to an A1-style range, e.g. ‘Sheet1!B2:D10’ or ‘B2:D10’. An unqualified range resolves against ‘sheet’ if given, otherwise the first sheet. Defined names are not accepted. Ranges larger than 10,000 cells are rejected. |
matchMode | "AND" | "OR" | optional | ”AND” = all criteria must match (narrows results). “OR” = any criterion matches (broader sweep). Defaults to “AND”. |
hasFormula | boolean | optional | Match cells that have (true) or don’t have (false) a formula. |
fillColor | string | optional | Match cells whose fill color matches this search term. Accepts hex values (“FFFF00”, “#FF0000”), partial hex (“FF”), named colors (“yellow”, “light blue”, “dark green”), and Excel preset names. Case-insensitive. |
formulaContains | string | optional | Match cells whose formula text contains this substring (case-insensitive). |
valueContains | string | optional | Match cells whose value (converted to text) contains this substring (case-insensitive). |
valueWithin | number[] | optional | Match cells whose numeric value falls within this inclusive range [min, max]. |