• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Copying values and pasting in next row but in different cell and so on.

anuwers

Member
Dear Friends,
I need the amount which i typed in G2 should come automatically in E3.
Then G4 to comein E5, then G6 to come in E7 so on...........

It should run through macro as i will be having such records to copy. I have huge numbers with this excercise.

Please support.





 

Attachments

  • AMT IN DIFF ROW.xlsx
    9.2 KB · Views: 10
This should do the job.
Code:
Sub Belle()
Set sht = Sheets("Sheet1")
    For Each c In sht.UsedRange.Columns(7).Cells
     If c.Row > 1 Then c.Offset(1, -2).Value = c.Value
Next
End Sub
 
According to the attachment it needs a single codeline like Range("G2", Cells(Rows.Count, 7).End(xlUp)).Copy [E3] …​
 
Dear Belle,

Thanks. It is working. But it get extra data as like below. I need the point 2 to work like and not the point 1 while running VBA

1) VBA code is also bringing the data of G3 to E4, G5 to E6, G7 to E8..... so son...
2) I need which i typed in G2 should come automatically in E3, Then G4 to come in E5, then G6 to come in E7 so on...........

Thanks
 
As all answers well work with your attachment, that needs a crystal clear explanation as it must be in the initial post​
and maybe a better attachment reflecting exactly the real workbook …​
 
Back
Top