Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy and replace xlsm files, but retain the values in selected cells... | Excel Discussion (Misc queries) | |||
copy between worksheets does not copy formulae just values | Excel Discussion (Misc queries) | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) | |||
compare values between workbooks and copy values | Excel Programming | |||
Range COPY function - how to copy VALUES and not formulas | Excel Programming |