Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
ExcelQuestionStephen
 
Posts: n/a
Default How do I sum a formula and paste it in 7 cell increments?

I have two worksheets I'm working with. One of them is a running total of
cash for each day of the month. The second worksheet shows only the weekly
totals which come from the sum of 7 days from the first worksheet. I want to
know if its possible to copy the first week sum(A1:A7) and use some type of
formula to then copy the formula down in 7 day increments and not have to do
this manually. So the second entry would be sum(A8:A15), then sum(A16:A23),
etc.
Is this possible?
  #2   Report Post  
Leo Heuser
 
Posts: n/a
Default

Stephen

One way:

In D2:
=SUM(OFFSET($A$1,(ROW()-ROW($D$2))*7,,7))

Copy down with the fill handle (the little square in the
lower right corner of the cell)

--
Best Regards
Leo Heuser

Followup to newsgroup only please.

"ExcelQuestionStephen"
skrev i en meddelelse
...
I have two worksheets I'm working with. One of them is a running total of
cash for each day of the month. The second worksheet shows only the

weekly
totals which come from the sum of 7 days from the first worksheet. I want

to
know if its possible to copy the first week sum(A1:A7) and use some type

of
formula to then copy the formula down in 7 day increments and not have to

do
this manually. So the second entry would be sum(A8:A15), then

sum(A16:A23),
etc.
Is this possible?



  #3   Report Post  
excelquestionstephen
 
Posts: n/a
Default

Thanks, that was very helpful

"Leo Heuser" wrote:

Stephen

One way:

In D2:
=SUM(OFFSET($A$1,(ROW()-ROW($D$2))*7,,7))

Copy down with the fill handle (the little square in the
lower right corner of the cell)

--
Best Regards
Leo Heuser

Followup to newsgroup only please.

"ExcelQuestionStephen"
skrev i en meddelelse
...
I have two worksheets I'm working with. One of them is a running total of
cash for each day of the month. The second worksheet shows only the

weekly
totals which come from the sum of 7 days from the first worksheet. I want

to
know if its possible to copy the first week sum(A1:A7) and use some type

of
formula to then copy the formula down in 7 day increments and not have to

do
this manually. So the second entry would be sum(A8:A15), then

sum(A16:A23),
etc.
Is this possible?




  #4   Report Post  
Leo Heuser
 
Posts: n/a
Default

"excelquestionstephen"
skrev i en meddelelse
...
Thanks, that was very helpful

You're welcome and thanks for the feedbacbk :-)

LeoH



  #5   Report Post  
Fredrik Wahlgren
 
Posts: n/a
Default


"ExcelQuestionStephen"
wrote in message ...
I have two worksheets I'm working with. One of them is a running total of
cash for each day of the month. The second worksheet shows only the

weekly
totals which come from the sum of 7 days from the first worksheet. I want

to
know if its possible to copy the first week sum(A1:A7) and use some type

of
formula to then copy the formula down in 7 day increments and not have to

do
this manually. So the second entry would be sum(A8:A15), then

sum(A16:A23),
etc.
Is this possible?


You can use a macro to create these formulas. The code below will enter
weekly totals in column B

Public Sub FillWeeklySum()
Dim i As Long

For i = 0 To 12
If 0 = i Then
Range("B" & CStr(i + 1)).FormulaR1C1 = "=SUM(A1:A7)"
Else
Range("B" & CStr(i + 1)).FormulaR1C1 = "=SUM(A" & CStr(i * 8) & ":A"
& CStr((i * 8) + 7) & ")"
End If
Next i
End Sub

/Fredrik




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 cell formula help tamato43 Excel Discussion (Misc queries) 2 March 31st 05 12:55 AM
Cell contents vs. Formula contents Sarah Excel Discussion (Misc queries) 3 December 15th 04 06:02 PM
Paste is is copying in formula, but display is wrong. Matt Excel Discussion (Misc queries) 2 December 7th 04 08:37 PM
Paste is is copying in formula, but display is wrong. Matt Excel Worksheet Functions 2 December 7th 04 08:37 PM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM


All times are GMT +1. The time now is 01:11 PM.

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"