ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Filter Function for 2-dimensional array (https://www.excelbanter.com/excel-programming/319273-filter-function-2-dimensional-array.html)

Cool Sport

Filter Function for 2-dimensional array
 
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]])


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Tom Ogilvy

Filter Function for 2-dimensional array
 
for a VBA array - no.

--
Regards,
Tom Ogilvy

"Cool Sport" wrote in message
...
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]])


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




Cool Sport

Filter Function for 2-dimensional array
 
I think I should loop through the array then check values on Filter
field using Like operator.

Thanks anyway,

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

onedaywhen[_2_]

Filter Function for 2-dimensional array
 
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.

--



All times are GMT +1. The time now is 01:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com