I got this macro from site, but this is not copying fully. Can you please check this macro and correct it for me.
Sub CopyBasedonSheet1()
Dim i As Long
Dim j As Long
Sheet1LastRow = Worksheets("STK").Range("A" & Rows.Count).End(xlUp).Row
Sheet2LastRow = Worksheets("DATA").Range("A" & Rows.Count).End(xlUp).Row
For j = 1 To Sheet1LastRow
For i = 1 To Sheet2LastRow
If Worksheets("STK").Cells(j, 1).Value = Worksheets("DATA").Cells(i, 1).Value Then
Worksheets("DATA").Cells(j, 9).Value = Worksheets("STK").Cells(i, 3).Value