-1

in this post Filtering 2D Arrays in Excel VBA several years ago it had been proposed a function for 2D array filter, but using an excel function :

If Evaluate(TmpVal & FindStr) Then Dic.Add i, ""

Now Evaluate it's not available on VBA for my application Autodesk. Please somebody could suggest me how to substitute it ? I have a bi-dimensional array of two objects properties, tied. Sometimes object could have same properties see example below

Object 1 Layer "GREEN" length 100

Object 2 Layer "GREEN" length 100

Object 3 Layer "GREEN" length 150

Object 4 Layer "BLUE" length 200

Count Results:

Layer BLUE Length 200 Count 1

Layer GREEN Length 100 Count 2

Layer GREEN Length 150 Count 1

So my scope is to have a bidimensional array with above result. Filter function unfortunately it works only with one-dimension array. Thank you

Peter
  • 1

1 Answers1

0

Ancient question, I wrote stdLambda which is a good alternative to Evaluate() method

for i = lbound(v,1) to ubound(v,1)
  if stdLambda.Create("$1 = """ & sValueName & """")(v(i,iField)) then Dic.Add i, ""
next
Sancarn
  • 2,575
  • 20
  • 45