When you assign your values into cells, you should check if these cells have values or not.
For example, if you want to append values vertically: A6, A7, then A8, A9, and the 3rd time is A10, 11,
you can use this:
currentRow = 6
currentVal = XlSheet.Range("A" & currentRow).value
While currentVal <> ""
currentRow = currentRow + 1
currentVal = XlSheet.Range("A" & currentRow).value
Wend
XlSheet.Range("A" & currentRow).value = P
XlSheet.Range("A" & (currentRow + 1)).value = R