Skip to content

Google Sheets — Find cell

Type: googlesheets-find-cell  ·  Package: Google Sheets Activities v1.0.5  ·  Output: Dictionary<string,object>

Searches the sheet for a value and returns the location of the first matching cell. It is Google Sheets’ “Find” from the robot: locate a label (“Total”), a code or a marker to read or write next to it.

Reads the sheet sheet (the first one if empty), or only the given range, and goes through the cells row by row, left to right, comparing their text with value according to match-type. Returns the first match.

  • The comparison is case-insensitive and uses the text displayed in the cell (a number formatted as 1,500 is compared as "1,500").
  • row and column are absolute in the sheet, even when you search a range that does not start at A1.
ParameterTypeDefaultDescription
valueobject—Value to find; compared as text.
ParameterTypeDefaultDescription
sessionZoanGoogleSheetsSession—Session from Google Sheets — Open. Inside Open’s body it is inherited and you can leave it empty.
sheetstring—Sheet to search. If empty, the first sheet is used.
rangestring—Limits the search to a range in A1 notation (e.g. A1:Z100). Default: the whole sheet.
match-typestringexactComparison: exact (cell equals the value), contains (cell contains the value) or starts-with (cell starts with the value).

Returns a Dictionary with the first match, or null if there is none (or the sheet is empty):

KeyTypeContent
addressstringA1 address of the cell, e.g. C7.
rowintRow number (1 = first row of the sheet).
columnintColumn number (1 = column A).
valuestringFull text of the matching cell.
MessageCause and fix
'value' is required.value is empty or its expression returned null.
No Google Sheets session available. Provide 'session' from a googlesheets-open activity, or place this activity inside the Open activity's body …The activity is outside Open’s body and received no session. Move it inside the body or pass the saved session.
The spreadsheet has no sheets to read.sheet and range are empty and the document has no sheets.
The service sheets has thrown an exception. HttpStatusCode is …Google rejected the call: missing sheet or range, no access, expired token or quota exceeded. See Google API errors.

Not finding the value is not an error: the output is null.

Find a code and mark its row as processed in column F:

Google Sheets — Find cell session = book sheet = "Orders" value = code → output: cell
If condition = !isNull(cell)
└─ then:
Google Sheets — Write cell session = book sheet = "Orders"
cell = "F" + cell["row"] value = "Processed"
Log message = "Code found at " + cell["address"]
  • Find row — find a whole row by one column.
  • Read cell — read a cell at a known position.