transfer data from sheet1 to sheet2

transfer data from sheet1 to sheet2
kindly see the sample file
i need the vba code
Book2.xlsm
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

0
 
Avinash SinghAuthor Commented:
No both are different question
0
 
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.
0
 
Avinash SinghAuthor Commented:
Thnx Roy Cox sir for giving ur precious time to this post
Problem Solved
0
 
Roy CoxGroup Finance ManagerCommented:
Pleased to help
0
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.