Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy values between files.

Hello
I hope I can explain my problem well enough to be understood.
I have two files one is a summary file the other is the rate file.
would like to copy values from the rate file to the summary file. Ther
are four sets of values in a group and 19 groups. The correspondin
values in each group are in the same columns and are the same number o
rows from the previous group proceeding down the spreadsheet. Eac
value in the rate file needs to be copied to a specific cell in th
summary file.
I am attempting to loop though each set of values within a group (inne
loop) then loop though each group (outer loop) and copy the values t
the summary file.
Below is my code thus far. Currently I only coded copying one set o
values in each group. If necessary I can send the files if it i
possible to attach them to a message.
Thanks.
Ron


Sub CopyToSum ()

Dim rRCount As Integer
Dim cRCount As Integer
Dim rSCount As Integer
Dim cSCount As Integer

rRCount = 15
cRCount = 5
rSCount = 7
cSCount = 4

For X = 1 To 19

For Y = 1 To 4

Windows("off site base rate4.xls").Activate
Cells(rRCount, cRCount).Select
Selection.Copy
Windows("off site base sum4.xls").Activate
Cells(rSCount, cSCount).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone
SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False

rRCount = rRCount + 0
cRCount = cRCount + 2
rSCount = rSCount + 1
cSCount = cSCount + 0

Next Y

rRCount = rRCount + 48
cRCount = cRCount + 0
rSCount = rSCount + 4
cSCount = cSCount + 0

Next X

End Su

--
Message posted from http://www.ExcelForum.com

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
Copy and replace xlsm files, but retain the values in selected cells... ARbitOUR Excel Discussion (Misc queries) 1 April 24th 09 04:21 PM
copy between worksheets does not copy formulae just values Chris@1000 Oaks Excel Discussion (Misc queries) 0 March 19th 06 11:44 AM
Copy/Paste how to avoid the copy of formula cells w/o calc values Dennis Excel Discussion (Misc queries) 10 March 2nd 06 10:47 PM
compare values between workbooks and copy values bgardiner Excel Programming 0 September 9th 03 03:54 PM
Range COPY function - how to copy VALUES and not formulas James Cooke Excel Programming 1 August 21st 03 07:04 PM


All times are GMT +1. The time now is 05:50 AM.

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"