Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default 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
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
Pasting hyperlink from sheet A to Sheet B? Chet Excel Programming 4 March 13th 07 07:28 PM
pasting form 1 sheet to another s_ali_hassan[_4_] Excel Programming 1 June 15th 06 12:08 PM
Pasting Into new sheet Todd Nelson Excel Discussion (Misc queries) 0 August 6th 05 01:17 AM
Problem pasting a row from a hidden sheet to the first free row on another visible sheet Didier Poskin Excel Programming 2 January 10th 04 01:18 AM
Pasting to Sheet Nigel[_7_] Excel Programming 2 November 14th 03 06:03 PM


All times are GMT +1. The time now is 08:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"