Here's the loop but I'm sure there's a better way:
![]()
Dim i As Long For i = 1 To 15 Range("B" & i).FormulaR1C1 = "=SUM(Sheet1!C[" & 9 + i & "])" Next
Regards
Here's the loop but I'm sure there's a better way:
![]()
Dim i As Long For i = 1 To 15 Range("B" & i).FormulaR1C1 = "=SUM(Sheet1!C[" & 9 + i & "])" Next
Regards
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
Or,
@mithil - please retitle your thread to something more appropriate - "optimise code" or some thing along those lines![]()
Range("B1:B15").FormulaR1C1 = "=SUM(INDEX(Sheet1!C12:C26,0,ROWS(R1:R)))"
Last edited by DonkeyOte; 10-29-2010 at 03:11 AM. Reason: missing )
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks