LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
JD JD is offline
external usenet poster
 
Posts: 7
Default Formula won't copy and offset as I intend

Hi,

I am trying to get the sum of three cells (always the same amount of
columns apart; J10, S10, AB10) on a different spreadsheet onto another
spreadsheet (in the same workbook) and then automatically apply this
same process, selecting another sequence moved to start the same amount

of columns again (AK10, AT10, BC10), but moved nine columns on the
destination spreadsheet.

My code is below, but it only moves the formula copy to S10, AB10,
AK10.

Any help would be appreciated.

//--
Dim Lastrow As Long

Sheets("Sheet2").Activate
Lastrow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
Range("L4").Select
Range("L4").Formula = "=SUM(Score!J10,Score!S10,Score!AB10)"
Range("L4:L" & Lastrow).FillDown
Set rngCopy = Range("L4:L" & Lastrow)
Set rngPaste = Range("U4")
For n = 1 To 4
rngCopy.SpecialCells(xlCellTypeFormulas, 23).Copy
rngPaste.PasteSpecial Paste:=xlPasteFormulas
Set rngPaste = rngPaste.Offset(0, 9)
Next n
Set rng = Range(Range("L4"), Range("L4").End(xlDown))
For i = 0 To 27
rng.Offset(0, 9).FillDown
Next
--//

[Apologies, but realised the subject line was gibberish.]

 
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 offset rows JPreeshl Excel Discussion (Misc queries) 2 May 1st 10 03:56 AM
copy offset to cell Kev Excel Discussion (Misc queries) 6 December 31st 06 04:02 AM
copy and paste with offset kevcar40 Excel Discussion (Misc queries) 3 October 10th 05 03:20 PM
Copy & Paste+Offset Ronald Cayne Excel Programming 2 September 7th 04 07:35 AM
Select and Copy Range using Offset jondorv Excel Programming 1 May 16th 04 05:23 PM


All times are GMT +1. The time now is 04:11 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"