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

fhernnet - May 3, 2010 at 03:12 AM - Latest reply: pratheepM7 1 Posts Tuesday December 6, 2016Registration date December 6, 2016 Last seen
- 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 

10 replies

rizvisa1 4482 Posts Thursday January 28, 2010Registration dateContributorStatus January 6, 2016 Last seen - May 3, 2010 at 07:05 AM
+25
Helpful
6
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
Was this answer helpful?  
Very Nice ...Thanks :)
Thanks a lot for the solution. Awsome. I have looking for this long time.
bimalc 1 Posts Tuesday October 27, 2015Registration date October 27, 2015 Last seen - Oct 27, 2015 at 03:38 PM
Thanks :)
You have actually helped me Riz, Thanks a lot!
pratheepM7 1 Posts Tuesday December 6, 2016Registration date December 6, 2016 Last seen - Dec 6, 2016 at 11:49 AM
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
Helpful
THanks buddy.... U definitely saved a day...
0
Helpful
Awesome. Exactly what I was looking for. Worked perfectly. Thanks Riz
0
Helpful
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!