Skip to content
Agent Tools

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.

ParameterTypeDescription
sheetstringoptionalRestrict search to a single sheet by name.
rangestringoptionalRestrict 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”.
hasFormulabooleanoptionalMatch cells that have (true) or don’t have (false) a formula.
fillColorstringoptionalMatch 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.
formulaContainsstringoptionalMatch cells whose formula text contains this substring (case-insensitive).
valueContainsstringoptionalMatch cells whose value (converted to text) contains this substring (case-insensitive).
valueWithinnumber[]optionalMatch cells whose numeric value falls within this inclusive range [min, max].