Results 1 to 6 of 6

Excel 2007 : (Copy Data from sheet 1 to sheet 2) (Pasting Option)

Threaded View

  1. #1
    Registered User
    Join Date
    05-08-2010
    Location
    usa
    MS-Off Ver
    execel 2007
    Posts
    3

    (Copy Data from sheet 1 to sheet 2) (Pasting Option)

    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
    Last edited by sunny1978; 05-12-2010 at 07:12 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1