ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   extracting data from one workbook to another (https://www.excelbanter.com/excel-programming/442404-extracting-data-one-workbook-another.html)

johncaleb

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!



.



Don Guillett[_2_]

extracting data from one workbook to another
 
I gave you an answer in your previous thread which you can easily modify.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"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!



.




JLGWhiz[_2_]

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!



.






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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com