Search 1st and Last occurence about certain values ​​through duplicate rows

  • Hello dear Friends,


    For Each Row having Same Values in Columns A B C D …
    For Columns J M P …



    I'm searching through various criteria...
    the first and last occurrence about values in columns JMP...
    for areas of duplicate values in column ABCD... AS SHOWN:



    [Blocked Image: http://i60.tinypic.com/5d5tvq.jpg]





    On the firsts rows... (those highlighted rows in bleu - starting odds line):



    1) Search for the first occurrence in each column J M P...
    2) Get the value ...
    3) Save it (according to 1X2 Columns J M P positions) in RANGE AW:AY...





    On the lasts rows... ( under highlighted starting odds rows - the closing odds line :(



    1) Search for the last occurrence in each column J M P...
    2) Get the value ...
    3) Save it (according to 1X2 Columns J M P positions) in RANGE AZ:BB...



    For example:





    -) the game coritiba cruzeiro from 5th until 2nd row...



    It starts on 1 (J5) with value 2,87 (AW2:AW5)
    It finishes on 1 (J2) with value 2,87 (AZ2:AZ5)
    '__________________________________________________________





    -) the game goias fluminense from 22nd until 10th row...



    It starts on 1 (J22) with value 2,37 (AW10:AW22)
    It finishes on 1 (J10) with value 2,37 (AZ10:AZ22)
    It finishes on X (P10) with value 2,62 (BB10:BB22)
    '__________________________________________________________





    -) the game estudiantes belgrano on 39th row



    It starts with 2,37 on 1 (J39) so we record it in (AW39:AW39) and finishes also with 2,37 on 1 so we record it in (AZ39:AZ39)
    It starts with 2,87 on X (M39) so we record it in (AX39:AX39) and finishes also with 2,87 on X so we record it in (BA39:BA39)
    '__________________________________________________________





    I hope that I have made it clear... i can't do better!



    Every suggestion and every form of help is appreciated;
    preferably in the form of Excel formula (also vba),
    such as to understand the process of what I research.





    Many thanks in advance to everyone who will come to my aid.
    Frankie.

  • Re: Search 1st and Last occurence about certain values through duplicate rows


    I follow what you want to do, but what I don't understand is how you are choosing the values.


    Why are you choosing the values 2,87; 2,37; and 2,62? I cannot find a pattern why those numbers are the ones to choose from the 3 listed. Why does row 10 have 2 selected? Can you explain the rules for selecting the starting and ending numbers?

  • Re: Search 1st and Last occurence about certain values through duplicate rows


    Hi dear shknbk2,


    Thanks for your interest.


    About the result 2,37 2,62 2,87...
    they are shown only as example as you read ... they aren't ones values to choose...
    all values are to be chosen...


    On 10th row 2,37 3,10 2,62 are lasts occurrences (goias game) that must be obviously chosen and recorded along range AZ:BB...


    The image posted is only a clarification of what i'm searching for.


    All values are to be chosen and saved in ranges i explained according to 1X2 if firsts or lasts occurrences as i wrote.


    If you have any solution share it so we work about togheter.
    Thanks for your time.


    Frank.

  • Re: Search 1st and Last occurence about certain values through duplicate rows


    Hello shknbk2,
    thank you very much for your support and your simple, brilliant idea.



    What I was looking for is solved!



    Thanks again,
    I am grateful to you.



    See you,
    frank.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!