Link to home
Start Free TrialLog in
Avatar of Avinash Singh
Avinash Singh

asked on

copy the data from sheet1 and paste that data to sheet2 each first empty row of each row

column highlighted in red colour nothing to do with that and we don't have to consider the red highlighted colour column, No role of that data
the coloumn highlighted in yellow colour we have to work on that
copy that data and paste that data to sheet2 each first empty row of each  row
in sheet2 also we don't have to consider the red highlighted coloumn no role of that coloumn
I have posted the question  before also  the code was proper but my data  is alpha numeric in red highlighted coloumn so that code does't work so that's y don’t consider red highlighted coloumn
see the sample file
Book1.xlsm
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Avinash Singh
Avinash Singh

ASKER

Thnx Neeraj Sir for giving ur precious time and support to this post
Problem Solved
You're welcome Avinash! Glad it worked as desired.
Sorry Neeraj sir
We have to do the same thing but actually my data look like this and i need the code of the same
See this sample file
And in future this mistake will not be repeated
Book1--1-.xlsm
No problem Avinash!
Please try this instead...

Sub CopyData()
Dim sws As Worksheet, dws As Worksheet
Dim lr As Long, lc As Long, i As Long

Application.ScreenUpdating = False

Set sws = Sheets("Sheet1")
Set dws = Sheets("Sheet2")

lr = sws.Cells(Rows.Count, 3).End(xlUp).Row

For i = 2 To lr
    lc = dws.Cells(i, Columns.Count).End(xlToLeft).Column + 1
    sws.Cells(i, 3).Copy dws.Cells(i, lc)
Next i

Application.ScreenUpdating = True
End Sub

Open in new window

Thnx Sir for giving ur Great support and precious time to this question
I have one more question that is almost same to this question if u say yes then only i will ask that question
Waiting for ur rply Sir
You're welcome Avinash!
Please post your question. Right now I am busy in something else. I am sure somebody else would take your question else I will see if I can find some time to address it.
No problem Sir take ur Time
Whenever u get time plz let me know Sir if it's solved then fine and if not then help me in that Sir
Have a great Day Sir
column highlighted in red colour nothing to do with that and we don't have to consider the red highlighted colour column, No role of that data
the coloumn highlighted in yellow colour we have to work on that
copy that data and paste that data to sheet2 each first empty row of each  row  into each table
in sheet2 also we don't have to consider the red highlighted coloumn no role of that coloumn
Book2.xlsm
Don't post your question here. The original question you asked has already been resolved.

Open a New Question instead so that it would be visible to other members also. And then post the link to your new question here also so that I can look at it when I have some time.
Sorry Sir
This Mistake will not be repeated
Thnx Sir for ur guidance