Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a spreadsheet that i need to add data from another spreadsheet daily.
Is there a way using vb that i can copy data from one spreadsheet to another, but have the data go to the last row.. ie if i copy data to the first 20 rows, then the next day i need to copy new data starting at row 21, and so forth each day. I would really like to do this using vba. Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something along the lines of the following:
Sub AAA() Dim WB1 As Workbook Dim WB2 As Workbook Dim LastRow As Long Set WB1 = Workbooks("FromBook.xls") ' source workbook Set WB2 = Workbooks("ToWorkbook.xls") ' destination workbook ' change destination sheet name below With WB2.Worksheets("SheetName") ' change column letter below LastRow = .Cells(.Rows.Count, "C").End(xlUp)(2, 1).Row ' change source sheet name and row number WB1.Worksheets("FromSheet").Rows(100).Copy _ Destination:=.Cells(LastRow, "A") End With End Sub Cordially, Chip Pearson Microsoft MVP Excel Product Group Pearson Software Consulting, LLC www.cpearson.com The San Diego Project Group, LLC (email is on the web site) USA Central Daylight Time (-5:00 GMT) On Fri, 3 Oct 2008 08:49:03 -0700, Mark J wrote: I have a spreadsheet that i need to add data from another spreadsheet daily. Is there a way using vb that i can copy data from one spreadsheet to another, but have the data go to the last row.. ie if i copy data to the first 20 rows, then the next day i need to copy new data starting at row 21, and so forth each day. I would really like to do this using vba. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Mover Cell to another place in worksheet | Excel Worksheet Functions | |||
Save 60% on Data Entry, Data Conversion, Data Processing Services byOffshore-Data-Entry | Excel Programming | |||
Data Entry Online, Data Format, Data Conversion and Data EntryServices through Data Entry Outsourcing | Excel Discussion (Misc queries) | |||
Formula oara mover uma linha para outra tabela | Excel Discussion (Misc queries) | |||
como mover numa planilha com o rato | Charts and Charting in Excel |