Hi!


I am in need of some help figuring out how to loop this process. The macro is built to fetch poker hand histories and paste them one at a time to let my formulas extract the info I want. Which then is stored on a different sheet. The formulas are working from a specified range of cells that each individual hand has to be pasted to.

In short the code below does exactly that, it selects the next hand data, copies it and then deletes the data to bring up next hand from under it.

So the trick now is that I want to loop this process so I dont have to click a button for each hand since there can be upwards to 10k hands to processs. I figured I could have a predetermined range where I can paste hands, so as to not run to many at a single go.


I have looked at the do until function but I dont really understand how to apply it to my case?



Sub HandProcess()

    rows("12").Select
    Selection.Delete Shift:=xlUp
    
    Range("A10").Select
    Range(Selection, Selection.End(xlDown)).Select
   
   ''''''''''''''''''''''''''''
   ' this part needs to be filled out with more code to
   ' copy the right cell values to another sheet but that
   ' part I can manage
   
   Selection.Copy
    Range("R1").Select
    ActiveSheet.Paste
''''''''''''''''''''''''''''''''''

      Range("A10").Select
    Range(Selection, Selection.End(xlDown)).Select
       Selection.Delete Shift:=xlUp
  rows("10:12").Select
    Selection.Delete Shift:=xlUp

End Sub