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?

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

x
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

0

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
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
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
VBA

From novice to tech pro — start learning today.