Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Column index
This is just part of a module code I have. The problem I am having is when
the paste data it only paste to one colunm (B). I need it to paste from col "B" to "AG" Any ideas?? Sub NewPeriod() If MsgBox("Confirm you are ready to create the next 28 day period?" & Chr(13) & Chr(13) & "Note: The data for the 28 day period twelve months ago" & Chr(13) & "will be permanently lost.", vbYesNo + vbQuestion, "Duty Sheet") = vbYes Then Else Exit Sub P = Range("CC18") Range("B7:AG51").Copy Cells(643 - (45 * P), 2).PasteSpecial Paste:=xlPasteValues Range("CC18") = 0 Range("B103:AG687").Copy Range("B58").PasteSpecial Paste:=xlPasteValues Range("B643:AG687").ClearContents Range("CC16").Formula = Range("CC16") + 45 Range("B7:AG51").ClearContents Range("B7").Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Column letter to index | Excel Discussion (Misc queries) | |||
Column index number | Excel Discussion (Misc queries) | |||
Naming of column index | Excel Worksheet Functions | |||
Using an Index by Column Headings instead of Column Numbers | New Users to Excel | |||
Column Index | Excel Worksheet Functions |