Hi Experts,
i have a 2D array that is simplified as
array= (10,"","")
array= (10,1,"")
array=(10,1,"")
array=(10,2,"")
array=(10,1,23)
array=(10,1,24)
array=(10,1,25)
array=(10,1,26)
array=(10,2,40)
array=(10,2,42)
as you can see above, the array is already sorted in ascending order by column 1, column 2 then column 3. I am trying to user application match on the 3 columns to find the first occurrence and last occurrence of a concatenated value of column 1,2.
for example
10-"" : first occurrence will be 1 and last occurrence will be 1
10-1 : first occurrence will be 2 and last occurrence will be 3
10-2 : first occurrence will be 4 and last occurrence will be 4
10-1 : first occurrence will be 5 and last occurrence will be 8
10-2 : first occurrence will be 9 and last occurrence will be 10
I can get the concatenated string (e.g 10-"", 10-1,10-2) and first occurrence as I am already looping into it. But how can i get the last occurrence index using application.match or by using any other function? I would like to avoid another loop
can you do application.match on 2 columns in a 2D array? any other alternate function i can use?
thanks
i have a 2D array that is simplified as
array= (10,"","")
array= (10,1,"")
array=(10,1,"")
array=(10,2,"")
array=(10,1,23)
array=(10,1,24)
array=(10,1,25)
array=(10,1,26)
array=(10,2,40)
array=(10,2,42)
as you can see above, the array is already sorted in ascending order by column 1, column 2 then column 3. I am trying to user application match on the 3 columns to find the first occurrence and last occurrence of a concatenated value of column 1,2.
for example
10-"" : first occurrence will be 1 and last occurrence will be 1
10-1 : first occurrence will be 2 and last occurrence will be 3
10-2 : first occurrence will be 4 and last occurrence will be 4
10-1 : first occurrence will be 5 and last occurrence will be 8
10-2 : first occurrence will be 9 and last occurrence will be 10
I can get the concatenated string (e.g 10-"", 10-1,10-2) and first occurrence as I am already looping into it. But how can i get the last occurrence index using application.match or by using any other function? I would like to avoid another loop
can you do application.match on 2 columns in a 2D array? any other alternate function i can use?
thanks