I need help with copying data to sheet 2, there seems to be a problem with my macro it copy's data in sheet 2, but it always pastes data in A2 Row, B2, C2 and so on... I can't seems to understand what is wrong. (what should I do if I want the data to paste below A2 Row for example: A5, B5 or C5.
I use this macro in my work sheet
Option Explicit
Sub CopyData()
Dim NextRw As Long
Dim wsMn As Worksheet, wsIp As Worksheet
Set wsIp = Sheets("Input")
Set wsMn = Sheets("Main")
[NextRw = wsIp.Range("A" & Rows.Count).End(xlUp).Row + 1]
wsIp.Range("A" & NextRw).Value = wsMn.Range("N2").Value
wsIp.Range("B" & NextRw).Value = wsMn.Range("C6").Value
wsIp.Range("C" & NextRw).Value = wsD.wsMn("J5").Value
End Sub
Bookmarks