Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am trying to write a macro that copy data from one wksheet to another master wksheet that i have. These masterwksheet as the names goes, has been used for record tracking for years. How do i find the last unused rows of that excelsheet and paste the copied data(from the new wksheet) and paste it to that unused row.? i tried with the following but it does not go to the last unused range.Rather it points to no where. can someone help to see if my script was wrong below: Cells.Select Selection.Copy 'To count the number of used rows and paste data to a new empty row. nNewRow = ActiveSheet.UsedRange.Rows.Count + ActiveSheet.UsedRange.Row LastCell = Cells(Rows.Count, "A").End(xlUp) Workbooks.Open Filename:="G:\Asia\Product\Operations\ML-Part Adjustments\QtyCostXfer Log.xls" 'This is the mastersheet. Windows("QtyCostXfer Log.xls").Activate Cells(nNewRow, 2).Select 'Does not work.It fails here. Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SUMPRODUCT can I use to get data from 2 worksheets in same wkBK | Excel Discussion (Misc queries) | |||
How do I copy records with specific text from one wkbk to another | Excel Worksheet Functions | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) | |||
Copy paste WkBk/sheet 1 to multiple wkbks/sheets | Excel Programming | |||
Copy Mult. Wkshts Into Single Wkbk | Excel Programming |