transfer data from sheet1 to sheet2

transfer data from sheet1 to sheet2
kindly see the sample file
i need the vba code
Avinash SinghAsked:
Who is Participating?
Roy CoxConnect With a Mentor Group Finance ManagerCommented:
What determines the destination columns? This example transfers the Open number to the next empty column in the respective row on sheet 2
Option Explicit

Sub TransferOpen()
    Dim iX As Integer, Rw As Integer, Col As Integer
    Dim LastRw As Long
    With Sheet1
        LastRw = .Cells(.Rows.Count, 1).End(xlUp).Row
        For iX = 2 To LastRw
            .Cells(iX, 3).Copy Sheet2.Cells(iX, .Columns.Count).End(xlToLeft).Offset(, 1)
        Next iX
    End With
End Sub

Open in new window

Avinash SinghAuthor Commented:
No both are different question
Roy CoxGroup Finance ManagerCommented:
So can you test this code and let me know what needs changing. The only thing that I can think of is if the Stock Items are in a different order.
Avinash SinghAuthor Commented:
Thnx Roy Cox sir for giving ur precious time to this post
Problem Solved
Roy CoxGroup Finance ManagerCommented:
Pleased to help
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.