Append Data to another sheet..

  • Thread starter Thread starter The Boondock Saint
  • Start date Start date
T

The Boondock Saint

Howdy all,

Ive got a sheet which will have 3 cols of data going down the sheet,
It will often have different numbers of rows of information, but id like to
append it to a master sheet,

is there a way that no matter how many rows are used (maybe like last row)
it would then copy it and put it on the end of all the data in the master
sheet,

for example...

if Sheet1 has 5 rows of data.... it would copy, a1:c5 and append it to any
data which is already in the master sheet,

of if it had say 3 rows of data, it would copy a1:c3 and tack it onto the
end of the master sheet..

Any advice would be awesome.

Cheers Saint...
 
Try this:

David Miller

====================================================

Sub PasteCells()
Dim LastRow As String
LastRow = UBound(Sheets("Sheet1").UsedRange.Value)
Sheets("Sheet1").Range("A1:C" & LastRow).Copy
Sheets("Master").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial
End Sub
 
Awesome thanks dave, that works brillantly,

Just wondering, ive noticed in alot of code people put in numbers like 65536
, does that mean it will only go down to that number ... for example if
there was 70000 would it stop working at that number?

Just wondering, im trying to learn these little things.

Cheers Saint.
 
Saint,

65536 is the number of rows in an excel sheet.

-for this use I am starting at the bottom of the sheet (65536) and
going up to find the last
used cell.

David Miller
 
oh true, awesome, I didnt know that.... thanks for that...

Cheers Saint
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top