Skip to main content

Filter

Return the rows of a sheet, a range or an Excel table whose value in one column matches a condition, as a Data Table; optionally also hide the other rows, or put the condition into the file as a real Excel filter.

Command in the Excel toolkit · id ooa.excel/filter · 13 inputs (1 required), 2 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
ColumnAnyYesColumn to test: header name, letter or 1-based number.
OperatorStringNoequalsHow the cell is compared with the value; between keeps values from value to value_to, both included.
ValueAnyNoValue to compare with; not needed for empty and not_empty.
Match caseBooleanNofalseMatch upper/lower case exactly for text comparisons.
First row is the headerBooleanNoFirst row holds column names; the workbook's open setting (true by default) when empty.
SheetStringNoSheet name; active sheet when empty.
SessionStringNoexcelWorkbook session.
Value toAnyNoUpper bound for the between operator.
Hide rowsBooleanNofalseAlso hide the sheet rows that do not match (and show the ones that do), like an AutoFilter; save to keep it.
TableStringNoExcel table name, e.g. Table1: filter only the rows of that table (its header row gives the column names); sheet and range are then not used.
RangeStringNoFilter only this range of the sheet; the whole used area when empty. A column letter or number still means the sheet column.
Apply in fileBooleanNofalseAlso put the condition into the workbook as an Excel filter: the header gets filter buttons, the other rows are hidden, and Excel shows the condition; save to keep it.
Clear existingBooleanNofalseFirst show the rows an earlier filter hid and remove the sheet's Excel filter.

Outputs​

OutputTypeWhat it is
tableTableMatching rows with the sheet's column names.
countNumberNumber of matching rows.