Consulting

Results 1 to 2 of 2

Thread: Copying Data from One Sheet to Different Sheets

  1. #1

    Unhappy Copying Data from One Sheet to Different Sheets

    I have one excel file wherein i have alphanumeric data in cells A1:A85 & B1:B85. (In Sheet 1)


    I have another 85 sheets in the file. I want to pull data of A1 into D20 & data of B1 into E20 (In Sheet 2)


    I want to do these in all the 85 sheets in sequential order. i.e. Sheet 2 should pull data of A1 & B1(Sheet 1), whereas Sheet 3 should pull data of A2 & B2(From sheet 1), and Sheet 4 should should pull data of A3 & B3(from Sheet 1) and so on.


    Can you please help me with this?


    Thanks in advance.

  2. #2
    VBAX Contributor
    Joined
    Oct 2012
    Location
    Brisbane, Queensland, Australia
    Posts
    163
    Location
    Use:

    Dim arrData As Variant
    Dim i As Long, j As Long
    arrData = Sheets(1).Range("A1").CurrentRegion
    For i = 1 To UBound(arrData, 1)
        With Sheets(i + 1)
            .Range("D20") = arrData(i, 1)
            .Range("E20") = arrData(i, 2)
        End With
    Next i

Posting Permissions

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