Good Evening,

I'm stuck with this code and I really don't know why, I think that it's a range issue but I can't see it so i thought that you may help me spot it.

I've a range of data between columns A to R, with a month in R, and a droplist with months.

I wished to get the data in the "DATA" tab to be displayed in the "JLOP" tab depending of the month value in R,
this data was then removed from the DATA tab, and when a new month was selected, pasted from JLOP to the Last row of DATA.

But, everytime I run it, I lose more and more data.

I thought that it was because I needed to calculate a new Last Row (LRDATA2) or because I would lost 1 row each time (that's why I did LrDATA + 1)
but I'm losing way more data on every loop...

I also thought that it might be caused by the ranges used (not starting in A1 etc) but i'm not losing the same number of rows on each loop.

I know that on the example below, I start with the JLOP one instead of the DATA tab, but that's just so that the script starts with an input.

Could you help me please or suggest me any improvements please?

The sheet is full of Employees data so I can't provide it, but I can send an example if needed.

Thank you very much and sorry for my english.

Sub Copy_DATA_to_JLOP_And_Remove_Blanks()

    Dim JLOP As Worksheet
    Dim DATA As Worksheet
    
    Set JLOP = ThisWorkbook.Sheets("JLOP")
    Set DATA = ThisWorkbook.Sheets("DATA")
    
    Dim LrJLOP As Long
    Dim LrDATA As Long
    
    LrJLOP = JLOP.Cells(Rows.Count, "R").End(xlUp).Row
    LrDATA = DATA.Cells(Rows.Count, "R").End(xlUp).Row

    Dim MonthSelected As String
   
    MonthSelected = DATA.Range("B2")

DATA.Range("A" & LrDATA + 1 & ":R" & LrDATA + 1).Value = JLOP.Range("A14:R" & LrJLOP).Value

JLOP.Range("A14:R" & LrJLOP).ClearContents

    Dim LrDATA2 As Long
    LrDATA2 = DATA.Cells(Rows.Count, "R").End(xlUp).Row

For j = 1 To LrDATA2
If DATA.Range("R" & j).Value = MonthSelected Then
    
    JLOP.Range("A" & j & ":R" & j).Value = DATA.Range("A" & j & ":R" & j).Value
    DATA.Rows(j).Delete

End If
Next j

      On Error Resume Next
  JLOP.Range("R14:R200").SpecialCells(xlBlanks).EntireRow.Delete

End Sub
Best regards,
Picsou