HELP about macro copy and paste [Solved/Closed]

Report
-
Posts
1862
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
July 30, 2015
-
Hello,

Just want to seek help to anyone about my problem about copying and paste multple raw and column thru new sheet also with designated raw and colunm as below example.i will use this formula in serveying as a use a form in sheet one and one i enter the detail in sheet one it is automatically copy to sheet 2 and save.then when i enter new data it is authomatically paste in the last empty raw.

i want to copy the below cell in grp A and paste to grp b as ff.

A B

d11 a1
f6 b1
g7 c1
b23:i23 d1:k1
b24:i24 d2:k2
b25:i25 d3:k3

Hope it makes sense. I have very little knowledge in writting VB but can manage to read and understand the simple ones. Could anyone help me with a macro that will do this automatically?

Your usual help and support will highly appreciate.


Thank you in advance

Marvs.

2 replies

Posts
1862
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
July 30, 2015
791
yes for current region you can use a range
something like this


With Worksheets("sheet1")
.range("A1:e10").copy


the dot before "range" is important.

it will copy only from A1 to E10. modify to suit you
1
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month

Posts
1862
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
July 30, 2015
791
not clear.
you want to copy the two column in sheet 1 to sheet2
if the old data is removed and new data entered you want the new data is to be copied to sheet2 below the data already copied . if this is so

try this macro

Sub test()
With Worksheets("sheet1")
.Range("A1").CurrentRegion.Copy
With Worksheets("sheet2")
.Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).PasteSpecial
End With
End With
Application.CutCopyMode = False

End Sub
thanks for your response.

i try the a/m formula it a big help. however there when you copy and paste the detaisl to another there is some details should not be included. maybe this one due to the currentregion command. is there possibility to assign specific range on the current rregion.