Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
pasting from one sheet to another
I believe I am making this too complicated.
The Start Here list of items and counts the number of items in C9. I want to use the number of items to determine how many columns I need on the other page + a column between each. There is a dummy column in column "H" that I want to use for every other column. I want the new group of cells to look like column H. Why doesn't my code work? and what corrections do I need to make? Thanks. Sub Duplicate() Dim i As Integer Dim k As Integer k = Sheets("start here").Range("c9") For i = 1 To k Sheets("Federal to State Reconciliation").Range("h6").copy Sheets("Federal to State Reconciliation").Range("h6").Offset(0, i * 2).PasteSpecial Application.CutCopyMode = False Next End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
pasting from one sheet to another
You are copying and pasting a single cell. To copy/paste the entire column, change ("h6") to ("h:h"). -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "jadeB" wrote in message I believe I am making this too complicated. The Start Here list of items and counts the number of items in C9. I want to use the number of items to determine how many columns I need on the other page + a column between each. There is a dummy column in column "H" that I want to use for every other column. I want the new group of cells to look like column H. Why doesn't my code work? and what corrections do I need to make? Thanks. Sub Duplicate() Dim i As Integer Dim k As Integer k = Sheets("start here").Range("c9") For i = 1 To k Sheets("Federal to State Reconciliation").Range("h6").copy Sheets("Federal to State Reconciliation").Range("h6").Offset(0, i * 2).PasteSpecial Application.CutCopyMode = False Next End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pasting hyperlink from sheet A to Sheet B? | Excel Programming | |||
pasting form 1 sheet to another | Excel Programming | |||
Pasting Into new sheet | Excel Discussion (Misc queries) | |||
Problem pasting a row from a hidden sheet to the first free row on another visible sheet | Excel Programming | |||
Pasting to Sheet | Excel Programming |