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”), color family words (“yellow”, “blue”, “gray”) which match by hue, specific color names (“light blue”, “dark green”) which match the nearest named color, and theme scheme names (“accent1”). Theme, indexed, and auto colors are resolved through the workbook theme. Case-insensitive.
fontColorstringoptionalMatch cells whose font color matches this search term. Accepts hex values (“0000FF”, “#FF0000”), partial hex, color family words (“blue”, “red”, “gray”) which match by hue, specific color names (“steel blue”) which match the nearest named color, and theme scheme names (“accent1”). Theme, indexed, and auto colors are resolved through the workbook theme. Case-insensitive. Useful for auditing color-coding conventions (e.g. blue font = hardcoded input).
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].