Filter Function for 2-dimensional array

  • Thread starter Thread starter Cool Sport
  • Start date Start date
C

Cool Sport

In vba, they've provided a Filter function as described below. Is there
any other built-in functions or ways that can do with 2-dimensional
array. I would like to pickup some rows in an array just like SELECT
statement in SQL.

Thanks,


------------------------------------------
Filter Function

Description

Returns a zero-based array containing subset of a string array based on
a specified filter criteria.

Syntax

Filter(sourcesrray, match[, include[, compare]])
 
I think I should loop through the array then check values on Filter
field using Like operator.

Thanks anyway,
 
You could use an ADO recordset. Think of it as an in-memory array with
some useful properties and methods, including Filter. It can work
disconnected from its data source, can even be fabricated from scratch
(i.e. no data source), saved to disk (e.g. as xml) and later reopened,
can be multi-dimensional to create hierarchies (a recordset of
recordsets) etc. I rarely use arrays these days!

Jamie.

--
 
Back
Top