Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
extracting data from one workbook to another
Hi,
I tried this macro (below), but didn't work...Not sure what happened. Please let me clarify my need... I have Sheet1 open in WorkBook1 with data in the range A1:G200 I need a macro to select & copy the last 73 rows of data,in this case A128:G200 and paste it on Sheet1 of WorkbookB starting at B10. Note this data range can change from day to day. Then copy the next set of 73 rows from the bottom, in this case A56:G127 and Paste that on cell K1 WorkbookB Sheet1. and so on until all the data is separated as such. Please help again. thx "JLGWhiz" wrote: Sub dk() Dim rng As Range Set rng = Workbooks(1).Sheets(1).UsedRange rng.Copy Workbooks(2).Sheets(2).Range("A1") Application.CutCopyMode = False Set wb2rng = Workbooks(2).Sheets(2).UsedRange With wb2rng .SpecialCells(xlCellTypeBlanks).Delete Shift:=xlUp End With End Sub "johncaleb" wrote in message ... hi again, I have 2 workbooks open. I need a macro to select and copy all non-blank cells from Sheet1 FROM one workbook, then paste these cells into the 2nd workbook, sheet2 at Cell A1. thanks much! . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
extracting data from one workbook to another
I responded to your previous post for 5/7/2010
"johncaleb" wrote in message ... Hi, I tried this macro (below), but didn't work...Not sure what happened. Please let me clarify my need... I have Sheet1 open in WorkBook1 with data in the range A1:G200 I need a macro to select & copy the last 73 rows of data,in this case A128:G200 and paste it on Sheet1 of WorkbookB starting at B10. Note this data range can change from day to day. Then copy the next set of 73 rows from the bottom, in this case A56:G127 and Paste that on cell K1 WorkbookB Sheet1. and so on until all the data is separated as such. Please help again. thx "JLGWhiz" wrote: Sub dk() Dim rng As Range Set rng = Workbooks(1).Sheets(1).UsedRange rng.Copy Workbooks(2).Sheets(2).Range("A1") Application.CutCopyMode = False Set wb2rng = Workbooks(2).Sheets(2).UsedRange With wb2rng .SpecialCells(xlCellTypeBlanks).Delete Shift:=xlUp End With End Sub "johncaleb" wrote in message ... hi again, I have 2 workbooks open. I need a macro to select and copy all non-blank cells from Sheet1 FROM one workbook, then paste these cells into the 2nd workbook, sheet2 at Cell A1. thanks much! . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
EXTRACTING ROWS OF DATA/FORMULAS TO CREATE NEW WORKBOOK | Excel Programming | |||
Extracting Workbook name | Excel Worksheet Functions | |||
Extracting Data from one workbook to another | New Users to Excel | |||
Extracting data from a closed workbook | Excel Programming | |||
extracting information from workbook to another | Excel Programming |