Skip to main content

Excel Formula: HEALTHROTA.CLAUSE

Builds one filter as text for HEALTHROTA.GET from a field, an operator and a value.

Builds one filter as text, in the form HEALTHROTA.GET expects, from a field, an operator and a value. Use it to build filters from cells instead of typing the filter text yourself. It does not fetch data and does not need you to be signed in.

Syntax

=HEALTHROTA.CLAUSE(field, op, value)

Argument

Required

Description

field

Yes

The field to filter on, such as "rota_id" or "date".

op

Yes

The operator: eq, neq, lt, lte, gt, gte, in, range, contains, starts_with or ends_with.

value

Yes

A value, or a range of cells. For in and range, the cells are joined with commas.

Examples

Formula

Result

=HEALTHROTA.CLAUSE("rota_id", "eq", 7)

rota_id eq 7

=HEALTHROTA.CLAUSE("rota_id", "in", A2:A4) with 1, 2, 3 in A2:A4

rota_id in 1,2,3

=HEALTHROTA.CLAUSE("date", "range", B2:C2) with 2026-01-01 and 2026-03-31 typed as text in B2:C2

date range 2026-01-01,2026-03-31

A date-formatted cell gives its Excel serial number, such as date gte 46023. HEALTHROTA.GET converts the serial number to the date when it runs, so the filter still works, but the clause text is harder to read.

Join several filters with TEXTJOIN and pass them to HEALTHROTA.GET:

=HEALTHROTA.GET("work_items", TEXTJOIN("; ", TRUE, HEALTHROTA.CLAUSE("rota_id", "in", A2:A4), HEALTHROTA.CLAUSE("date", "gte", B2)))

HEALTHROTA.QUERY reads filters straight from Field, Operator and Value cells, so it does not need HEALTHROTA.CLAUSE.

Errors

The cell shows #VALUE! when the field is empty or the operator is not in the list above. Hover over the cell to read the message.

HEALTHROTA.CLAUSE does not check the value. A missing value, an empty in list, or a range without exactly two values is reported by HEALTHROTA.GET when it uses the clause.

Related

Did this answer your question?