Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Feb 7, 1:58 pm, "Bob Phillips" wrote:
You still had a copy Destination in there with Pastespecial. try this Sub FormatArea1() Application.ScreenUpdating = False Sheets("Month").Activate Cells.Select Selection.Copy Sheets("Area 1").Activate Range("A1").Select Selection.PasteSpecial Paste:=xlFormats Selection.PasteSpecial Paste:=xlPasteValues ActiveWindow.DisplayGridlines = False ActiveWindow.Zoom = 75 For i = 39 To 8 Step -1 Select Case Cells(i, 1).Value Case "City1", "City2", "City3" Case Else Rows(i).Delete Shift:=xlUp End Select Next i Range("A1").Select Sheets("Cumulative").Activate Cells.Select Selection.Copy Sheets("Area 1").Activate Worksheets("Cumulative").Range("A1:O39").Copy Worksheets("Area1").Range("A65536").End(xlUp).Offs et(6).PasteSpecial Paste:=xlPasteValues For i = 66 To 34 Step -1 Select Case Cells(i, 2).Value Case "City1", "City2", "City3" Case Else Rows(i).Delete Shift:=xlUp End Select Next i Range("A1").Select Sheets("Month").Activate Range("A1").Select End Sub -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Sean" wrote in message oups.com... Here it is Bob Sub FormatArea1() Application.ScreenUpdating = False Sheets("Month").Activate Cells.Select Selection.Copy Sheets("Area 1").Activate Range("A1").Select Selection.PasteSpecial Paste:=xlFormats Selection.PasteSpecial Paste:=xlPasteValues ActiveWindow.DisplayGridlines = False ActiveWindow.Zoom = 75 For i = 39 To 8 Step -1 Select Case Cells(i, 1).Value Case "City1", "City2", "City3" Case Else Rows(i).Delete Shift:=xlUp End Select Next i Range("A1").Select Sheets("Cumulative").Activate Cells.Select Selection.Copy Sheets("Area 1").Activate Worksheets("Cumulative").Range("A1:O39").Copy Destination:= _ Worksheets("Area1").Range("A65536").End(xlUp).Offs et(6).PasteSpecial _ Paste:=xlPasteValues For i = 66 To 34 Step -1 Select Case Cells(i, 2).Value Case "City1", "City2", "City3" Case Else Rows(i).Delete Shift:=xlUp End Select Next i Range("A1").Select Sheets("Month").Activate Range("A1").Select End Sub- Hide quoted text - - Show quoted text - Thanks all its working now |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete Entire Row | Excel Programming | |||
Delete entire row if | Excel Discussion (Misc queries) | |||
Need to delete last value in column but not delete entire row | Excel Programming | |||
Delete Entire Row If Q | Excel Programming | |||
Another delete entire row | Excel Programming |