E
ExcelMonkey
I have an array of data (HourData) with 20 rows and 6 columns as seen below.
I want to find the row where the value in the 6th column is equal to or
greater than a value (X = 2700). This should return the row 12:
8 D E 491 21 2918
I was simply going to use a Match/Index to do this on the 6 column of the
array:
Answer = Application.WorksheetFunction.Match(X, Application.Index(HourData,
0, 6), -1)
As I know that it may not an exact match, I have used the -1 at the end of
the match to find the smallest value that is greater than or equal to X.
However I am getting an error message saying "unable to get Match property"
What have I missed here?
Thanks
EM
***************************************************
7 W D 437 0 437
5 N E 73 0 510
7 W D 67 0 577
2 D D 87 5 664
8 D E 99 6 763
5 N E 492 10 1255
10 D C 309 11 1564
3 C B 87 13 1651
2 D D 313 13 1964
6 U C 211 14 2175
9 D E 252 18 2427
8 D E 491 21 2918
4 U E 82 22 3000
1 C E 241 22 3241
4 U E 57 23 3298
10 D C 69 30 3367
3 C B 207 31 3574
1 C E 61 33 3635
6 U C 81 34 3716
9 D E 84 49 3800
I want to find the row where the value in the 6th column is equal to or
greater than a value (X = 2700). This should return the row 12:
8 D E 491 21 2918
I was simply going to use a Match/Index to do this on the 6 column of the
array:
Answer = Application.WorksheetFunction.Match(X, Application.Index(HourData,
0, 6), -1)
As I know that it may not an exact match, I have used the -1 at the end of
the match to find the smallest value that is greater than or equal to X.
However I am getting an error message saying "unable to get Match property"
What have I missed here?
Thanks
EM
***************************************************
7 W D 437 0 437
5 N E 73 0 510
7 W D 67 0 577
2 D D 87 5 664
8 D E 99 6 763
5 N E 492 10 1255
10 D C 309 11 1564
3 C B 87 13 1651
2 D D 313 13 1964
6 U C 211 14 2175
9 D E 252 18 2427
8 D E 491 21 2918
4 U E 82 22 3000
1 C E 241 22 3241
4 U E 57 23 3298
10 D C 69 30 3367
3 C B 207 31 3574
1 C E 61 33 3635
6 U C 81 34 3716
9 D E 84 49 3800