Report

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

Ask a question fhernnet - Last answered on Dec 6, 2016 at 11:49 AM by pratheepM7
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 
Helpful
+25
plus moins
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?  
RAVIKIRAN- Aug 17, 2011 at 12:57 PM
Very Nice ...Thanks :)
Harish- Nov 24, 2012 at 12:49 PM
Thanks a lot for the solution. Awsome. I have looking for this long time.
bimalc 1Posts Tuesday October 27, 2015Registration date October 27, 2015 Last seen - Oct 27, 2015 at 03:38 PM
Thanks :)
Saravanan- Jul 3, 2016 at 11:04 PM
You have actually helped me Riz, Thanks a lot!
pratheepM7 1Posts 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
Reply
Helpful
+0
plus moins
THanks buddy.... U definitely saved a day...
Helpful
+0
plus moins
Awesome. Exactly what I was looking for. Worked perfectly. Thanks Riz
Helpful
+0
plus moins
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!

Member requests are more likely to be responded to.

Members can monitor the statuses of their requests from their account pages.

A CCM membership gives you access to additional options.

Not a member yet?

Sign up now. It takes less than a minute and is completely free!