View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default 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!



.