PC Review


Reply
Thread Tools Rate Thread

Append Data to another sheet..

 
 
The Boondock Saint
Guest
Posts: n/a
 
      14th Dec 2006
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...




 
Reply With Quote
 
 
 
 
Dave Miller
Guest
Posts: n/a
 
      14th Dec 2006
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

 
Reply With Quote
 
The Boondock Saint
Guest
Posts: n/a
 
      14th Dec 2006
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.
"Dave Miller" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
Dave Miller
Guest
Posts: n/a
 
      14th Dec 2006
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


The Boondock Saint wrote:
> 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.
> "Dave Miller" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> >


 
Reply With Quote
 
The Boondock Saint
Guest
Posts: n/a
 
      14th Dec 2006
oh true, awesome, I didnt know that.... thanks for that...

Cheers Saint
"Dave Miller" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>
> The Boondock Saint wrote:
> > 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.
> > "Dave Miller" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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
> > >

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i append data to a sheet or book from another one Abdulla Microsoft Excel Programming 1 26th Jan 2010 08:36 AM
Append data to a sheet's next row Turbo Microsoft Excel Programming 2 28th Apr 2007 11:27 AM
How to Append data in excel sheet =?Utf-8?B?dml2?= Microsoft Excel Programming 2 21st Mar 2007 01:42 PM
Re: Macro to cpy data from one wrkbk and append to a sheet in anotherwrkbk Dave Peterson Microsoft Excel Discussion 5 29th Sep 2005 03:46 AM
Append the data given in diff sheets of an Excel File to one sheet =?Utf-8?B?c2Fuc2tfMjM=?= Microsoft Excel Worksheet Functions 3 10th May 2005 02:00 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:52 PM.