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: 391
Default Matching/Finding/Search Array Element

2003, 2007

37
|
CheckStr = "-9'Min. Int.'!F26-'Min.-7 Int.'!F31+28038.66^35+[C:\123]'Clos-6ing'!E3^1"
(BTW, the string above does not make any sense in its current form - just to test)

Data Table produced a previous Sub() above string

ConstOnly: 9 StartPosInStr: 2 StrLength: 1
ConstOnly: 7 StartPosInStr: 25 StrLength: 1
ConstOnly: 28038.66 StartPosInStr: 37 StrLength: 8
ConstOnly: 35 StartPosInStr: 46 StrLength: 2
ConstOnly: 1 StartPosInStr: 72 StrLength: 1

myArr() table is as follows:

myArr(1,1) = 9 myArr(1,2) = 2 myArr(1,3) = 1
myArr(2,1) = 7 myArr(2,2) = 25 myArr(2,3) = 1
myArr(3,1) = 28038.66 myArr(3,2) = 37 myArr(3,3) = 8
myArr(4,1) = 35 myArr(4,2) = 46 myArr(4,3) = 2
myArr(5,1) = 1 myArr(5,2) = 72 myArr(5,3) = 1

What is the quickest/smartest Array Matching/Finding/Search? To ascertain:

Givens: TestChar = "2" Its position in CheckStr = 37

IF (TestChar's "2" ; StartPosInStr = 37) = myArr(x,2) Then
TestCharValid = True
Else
TestCharValid = False
End if

In short, is it best to do an Array loop Then:

IF (TestChar's "2" ; StartPosInStr = 37) = myArr(3,2) Then
TestCharValid = True
Else
TestCharValid = False
End if

Or

Is there an array search function which can directly VLookup? all Array(2,x)??

TIA EagleOne
 
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
Rules for element-by-element product in array multiplication Paul Excel Programming 2 March 22nd 08 11:42 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 6 November 9th 05 05:54 AM
Array problem: Key words-Variant Array, single-element, type mismatch error davidm Excel Programming 1 November 8th 05 04:21 AM
Finding the cell reference of a matching search value ndrewitt Excel Worksheet Functions 0 April 13th 05 01:43 AM


All times are GMT +1. The time now is 09:41 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"