Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
EXTRACTING ROWS OF DATA/FORMULAS TO CREATE NEW WORKBOOK JingleRock[_2_] Excel Programming 1 September 29th 09 09:31 AM
Extracting Workbook name [email protected] Excel Worksheet Functions 6 October 2nd 06 06:23 PM
Extracting Data from one workbook to another jbobzien New Users to Excel 3 February 20th 06 07:47 PM
Extracting data from a closed workbook Barb Reinhardt Excel Programming 2 February 7th 06 02:47 PM
extracting information from workbook to another pauluk Excel Programming 1 January 21st 04 06:55 PM


All times are GMT +1. The time now is 02:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"