Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
WORKS LIKE A CHARM
"TomPl" wrote: This should work: Sub CopyAndPasteV2() For Each sht In Sheets Select Case sht.Name Case "D": SourceRow = -1 Case "A": SourceRow = 5 Case "B": SourceRow = 6 Case Else: SourceRow = 0 End Select If SourceRow 0 Then sht.Range("a6").EntireRow.Insert Worksheets("INTRADAY").Rows(SourceRow).Copy sht.Rows(6).PasteSpecial xlValues sht.Range("C7:D7").Copy sht.Range("C6") sht.Range("J7:M7").Copy sht.Range("J6") sht.Range("P7:T7").Copy sht.Range("P6") End If If SourceRow = -1 Then sht.Range("a6").EntireRow.Insert End If Next sht End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Simple Macro - I think... Copy - Paste on Click | Excel Discussion (Misc queries) | |||
Copy and paste over multiple sessions error | Excel Discussion (Misc queries) | |||
Very Simple Copy and Paste Sheet - Error | Excel Programming | |||
How to write a simple copy-paste macro? | New Users to Excel | |||
Macro newbie - simple copy/paste function | Excel Programming |