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 Paste Range to a new workbook

The macro below is designed to copy data from a master tab and paste
to one of three resultant tabs. Unfortunately, I have made a some
error with my paste command. It pastes ONLY cell (1,AC) instead of
pasting cells 1 THROUGH 29 in the active row.

Any advice would be great! Thanks to Steve (Scoops) for the previous
assistance!

Sub UPDATE_STATUS()
'
' UPDATE_STATUS Macro

' Purpose of this section is to delete old data from resultant
worksheets

Sheets("Personal").Select
Rows("2:65535").Select
Selection.Delete Shift:=xlUp

Sheets("Corporate").Select
Rows("2:65535").Select
Selection.Delete Shift:=xlUp

Sheets("Disconnect").Select
Rows("2:65535").Select
Selection.Delete Shift:=xlUp

' Purpose of this section is copying of data to appropriate resultant
worksheets

Sheets("Master").Select

For Each cell In Range("F:F")
Select Case cell
Case "P"

Cells(1, 29).Copy
Sheets("Personal").Select
Cells(Rows.Count, 1).End(xlUp)(2).Select
ActiveSheet.Paste
Sheets("Master").Select

Case "C"
Cells(1, 29).Copy
Sheets("Corporate").Select
Cells(Rows.Count, 1).End(xlUp)(2).Select
ActiveSheet.Paste
Sheets("Master").Select

Case "D"
Cells(1, 29).Copy
Sheets("Disconnect").Select
Cells(Rows.Count, 1).End(xlUp)(2).Select
ActiveSheet.Paste
Sheets("Master").Select


End Select
Next

ActiveWorkbook.Save

 
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
Paste Filtered Range to New Workbook- AS andiam24 Excel Discussion (Misc queries) 2 December 10th 09 01:20 AM
Copy paste a range from one Workbook to another Kc-Mass Excel Programming 2 December 13th 06 01:18 AM
Paste Range to New Workbook nejer2000 Excel Programming 5 October 13th 06 02:16 PM
Need a macro to copy a range in one workbook and paste into another workbook Paul Excel Programming 8 July 1st 04 07:42 AM
Copy a range of cells in an unopened workbook and paste it to the current workbook topstar Excel Programming 3 June 24th 04 12:50 PM


All times are GMT +1. The time now is 05:39 AM.

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"