LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Simple copying and pasting macro

Hi,

I am pretty much a novice in vba, but I think what I am trying to do is
pretty simple.

I wrote the following code

Public Sub Qtr1()
Dim cell1 As Range
For Each cell1 In Worksheets("projection").Range("E5:E69")
cell1.Resize(1, 1).Copy
With Worksheets("vol qtr")
.Range("J5").PasteSpecial Paste:=xlValues
End With
Next
Application.CutCopyMode = False
End Sub

The purpose of the code is to copy and paste values from one sheet into
another. This code works without any problems! However, I want to do the
following: after it has copied E5:E69 into "vol qtr"
I want it to copy E5:E69 into "price qtr" cell (J5)

I tried just repeating the same code (changing the variable from cell1 to
cell2) after next statement, but that does not work. I want the entire
process to be within the same macro so that it can be executed with a click
on just one button.

Thank you, in advance, for your help.

Henrik
 
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
Copying and pasting with a macro Wombat Excel Discussion (Misc queries) 1 March 4th 10 10:10 AM
Macro for Copying pasting between different spreadsheets Adnan Excel Discussion (Misc queries) 4 April 21st 09 03:12 PM
Macro copying and pasting James O[_2_] Excel Discussion (Misc queries) 0 April 24th 07 04:56 PM
Copying and Pasting Macro Jurassien Excel Discussion (Misc queries) 6 February 7th 07 11:57 PM
Copying and Pasting Rows Macro tnederlof Excel Discussion (Misc queries) 1 February 2nd 07 05:23 PM


All times are GMT +1. The time now is 09:37 AM.

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

About Us

"It's about Microsoft Excel"