LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Copy pages from one worksheet to another

Hi :

Can anyone help me with this. I am trying to get a macro
to look at a worksheet and determine which of the 10
pages in the worksheet have data. (All pages are sized
exactly the same and contain data in the same cells (If
Data is present, it will first reside in a9 - Page1, A39 -
Page2, etc...)I would then like to copy the page(S) that
do contain data to the next empty cell in a different
worksheet. (formatting as well). Then go back to the
worksheet that was copied and clear the data. After that
I want it to go to the next worksheet and perform the
same processes.

The code below is where I am and being somewhat of a
novice, with VBA, I have used the macro recorder for most
of the code.

Sub CopyDOCS1()


Sheets("Used Cores").Select
Range("A129").Select
If IsEmpty(ActiveCell) Then
Range("A99").Select
Else: Range("a1:p150").Select

Range("A99").Select
If IsEmpty(ActiveCell) Then
Range("A69").Select
Else: Range("A1:P120").Select

Range("A69").Select
If IsEmpty(ActiveCell) Then
Range("A39").Select
Else: Range("A1:P90").Select

Range("A39").Select
If IsEmpty(ActiveCell) Then
Range("A9").Select
Else: Range("A1:P60").Select

Range("A9").Select
If Range("A9") < "" Then
Range("A1:P30").Select
Else: Exit Sub

End If
End If
End If
End If
End If

Selection.Copy

Sheets("INV").Select
Dim cell As Range
Set cell = Cells(65536, 1).End(xlUp)
Set cell = cell.Offset(1, 0).Select

ActiveSheet.Paste
Application.CutCopyMode = False

Sheets("Used Cores").Select
Range("A9:L28").Select
Selection.ClearContents


End Sub

Any help would be appreciated

Sam
 
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
Number of pages in worksheet doesn't match Print Preview pages delru Excel Discussion (Misc queries) 2 May 10th 10 10:08 PM
Copy headers and footers to other pages? Laura Excel Worksheet Functions 1 August 3rd 07 10:10 PM
Copy the same cell from numerouse pages the-jackal New Users to Excel 4 February 26th 06 01:40 PM
Copy a formula to 15 pages ED New Users to Excel 1 January 20th 06 02:11 PM
Auto Choosing Pages to Copy Sam Fowler[_2_] Excel Programming 2 April 3rd 04 03:11 PM


All times are GMT +1. The time now is 11:48 PM.

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

About Us

"It's about Microsoft Excel"