Macro copy and paste in next blank cell [Solved/Closed]

- - Latest reply: pratheepM7
Posts
1
Registration date
Tuesday December 6, 2016
Status
Member
Last seen
December 6, 2016
- Dec 6, 2016 at 11:49 AM
Hi guys,
I need some helping in excel macro. I have two sheets in a workbook. Sheet1 is for summary and Sheet2 is for the raw data. I need to update/insert/copy data in Sheet2 to Sheet1. Below is the sample macro code:

Sub Summarize()

Range("A6:AT6").Select
Selection.Copy
Sheets("ImprovementLog").Select
Range("B283").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("B283").Select

End Sub

The code above is working but everytime I change data in Sheet2, the Sheet1 only replace its data. What I need is everytime I change data in Sheet2, it should be added (append) in Sheet1. Please help me.
Appreciate your help.


Many thanks and regards,
Fhernnet

See more 

4 replies

Best answer
Posts
4475
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
January 6, 2016
754
25
Thank you
Not entirely sure about your copy part. How ever if you want to paste by appending then you need to know the last used row. Here
Range("B283").Select
you are hard coding the row


this find the last used cell in column B and then select one cell below it
lMaxRows = Cells(Rows.Count, "B").End(xlUp).Row
Range("B" & lMaxRows +1).select

Say "Thank you" 25

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

CCM 5986 users have said thank you to us this month

Very Nice ...Thanks :)
Thanks a lot for the solution. Awsome. I have looking for this long time.
bimalc
Posts
1
Registration date
Tuesday October 27, 2015
Status
Member
Last seen
October 27, 2015
-
Thanks :)
You have actually helped me Riz, Thanks a lot!
pratheepM7
Posts
1
Registration date
Tuesday December 6, 2016
Status
Member
Last seen
December 6, 2016
-
Hi rizvisa,

I need help in macro. I have example value in column A and i need output like below. could you pls help for below output

Ex :
US
US
US
UK
UK
UK

output :
Info-US-1
Info-US-2
Info-US-3
Info-UK-1
Info-UK-2
Info-UK-3
0
Thank you
THanks buddy.... U definitely saved a day...
0
Thank you
Awesome. Exactly what I was looking for. Worked perfectly. Thanks Riz
0
Thank you
I tried this and it worked if you only need to append a data once.

Please help me out. What macro code should I use so that everytime I click on a button after adding a data on a single cell it compiles to a list. I want the top of my worksheet to look like this on top:

Data: ___________ +

so everytime I put data on the space and click on +, the data will be added to a list...Pease help!