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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Roy CoxGroup 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


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.