Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JD JD is offline
external usenet poster
 
Posts: 7
Default Formula offscopy and offset

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
--//

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
offset formula vmohan1978 Excel Worksheet Functions 3 December 30th 09 09:32 AM
Offset Formula or Better Way David Excel Worksheet Functions 1 December 15th 08 09:16 AM
Offset formula SHELL Excel Worksheet Functions 4 August 10th 08 03:37 AM
Offset Formula Secret Squirrel Excel Discussion (Misc queries) 3 July 28th 08 12:48 AM
Offset in Formula Joey Excel Discussion (Misc queries) 1 November 12th 06 01:23 AM


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