Selected Answer
Leopard, I ran through your code and made some small changes to it, you did a really good job and got almost all the way there but you needed to find the next empty row for where you pasted the data - I added that line of code and then changed how you reference the range to paste the data and, since I'm in a good mood, even tidied up the code a bit lol.
Here you go:
Sub test1()
Dim rcnt As Long, nextBRow As Long
rcnt = Worksheets("test").Range("g" & Rows.Count).End(xlUp).Row
For i = 1 To rcnt
If Range("G" & i).Value = "YES" Then
' Find the next empty row of data in the "paste region".
nextBRow = Range("B30").CurrentRegion.Rows(Range("B30").CurrentRegion.Rows.Count).Offset(1).Row
Range("G" & i).Offset(0, -5).Copy
Range("B" & nextBRow).PasteSpecial xlPasteAll
End If
Next i
Application.CutCopyMode = False
End Sub
The funny thing is that this exact type of scenario is what I am finishing for a "Practical Tutorial" for the ranges section of the VBA course I'm making and you just so happened to post this question the same day I was finishing that specific tutorial haha.
Ranges can be Very confusing to deal with in VBA so do not feel bad at all with your code. If you have any questions with the changes I made, let me know and I'll post a longer explanation, but the basics of it are that Range("B30").CurrentRegion is basically the same as selecting cell B30 and hitting Ctrl + A on the keyboard and it is this functionality that makes it easier to find the next empty row for that section of the worksheet.
I hope this helps :)