estatefinds

07-09-2016, 03:10 PM

I have 5 number combinations in column A that is separated by "-".

I need a macro in which I select a combination, and the macro returns the location of each of the FIVE numbers of that selected combination, and places the results into columns B thru F.

So for example: the 17 in the combination selected in the black box border is found below this selected combination three rows down in the third position which I call C but is actually found on the excel column D So I place a 3 there.

then the next number 19 is found 8 rows down from the combination selected and in the third position called C which is the excel column D and the number 8 is placed there.

then the number 27 is found nine rows down from the selected combination and in the fifth position called E which is the excel column F a 9 is placed there.

then the number 28 is found is six rows down from the selected combination and in the fifth postion called E which is the excel position F and a 6 is placed there.

then the number 31 is found ten rows below the selected combination in the position called D in which the excel column is E and the number 10 placed there.

When I go down to select the next combination the data in columns H thru L will go down one row as well this is just a visual aid.and the results will follow the combination I select. so the data result will line up with each combination I select just as the first example I posted.

now, when I select the the next combination down the invisible chart H thru L just for show shows how I come up with how many rows down from the combination.

Also the data in N thru R is also just to visualize how this works just a visual aid only.

Any help at all is appreciated!!! Thank you in advance!

I need a macro in which I select a combination, and the macro returns the location of each of the FIVE numbers of that selected combination, and places the results into columns B thru F.

So for example: the 17 in the combination selected in the black box border is found below this selected combination three rows down in the third position which I call C but is actually found on the excel column D So I place a 3 there.

then the next number 19 is found 8 rows down from the combination selected and in the third position called C which is the excel column D and the number 8 is placed there.

then the number 27 is found nine rows down from the selected combination and in the fifth position called E which is the excel column F a 9 is placed there.

then the number 28 is found is six rows down from the selected combination and in the fifth postion called E which is the excel position F and a 6 is placed there.

then the number 31 is found ten rows below the selected combination in the position called D in which the excel column is E and the number 10 placed there.

When I go down to select the next combination the data in columns H thru L will go down one row as well this is just a visual aid.and the results will follow the combination I select. so the data result will line up with each combination I select just as the first example I posted.

now, when I select the the next combination down the invisible chart H thru L just for show shows how I come up with how many rows down from the combination.

Also the data in N thru R is also just to visualize how this works just a visual aid only.

Any help at all is appreciated!!! Thank you in advance!