LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Best ways to search an array/collection for an element

Hi guys!

I'm creating a small library of utilities for VBA programming, and
right now I'm completing my ArrayManagement and CollectionManagement
module. I was considering different solutions for the classical case
of searchin an array or collection for a specified elements. So far
I've considered using Worksheetfunction.VLOOKUP,
Worksheetfunction.Match (needs some care to take into account the
"element not found" case) for the arrays. I also developed an handy
binary search function for sorted arrays, but it works only for 1D
numeric arrays (sorted in either nonincreasing or nondecreasing order)
but I have no idea on how to extend it multiD/non numeric arrays (if
that's possible at all). Also, I would like to find some smart "Is
Nothing"-based trick for searching in a collection. and Any
suggestion/alternatives? Thanks,

Best Regards

deltaquattro

ps if anybody is interested, I can post my "rough" attempts at a
solution.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Matching/Finding/Search Array Element [email protected] Excel Programming 8 May 9th 09 10:53 PM
Rules for element-by-element product in array multiplication Paul Excel Programming 2 March 22nd 08 11:42 PM
delete element is collection Gary Keramidas Excel Programming 3 November 14th 07 10:48 PM
Search array and return element No Ron Excel Worksheet Functions 7 May 17th 06 05:27 AM
Array problem: Key words-Variant Array, single-element, type mismatch error davidm Excel Programming 1 November 8th 05 04:21 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"