Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Summing every third cell
Well, I've tried several different things, but have not been successful.
I'm trying to sum every third row of a particular column (i.e. A2+A5+...) What I have written so far is: For n = 2 To 233 Step 3 For m = 4 To 15 Step 1 Cells(236, m).FormulaR1C1 = ?????? Cells(236, m).NumberFormat = "$#,##0_);[Red]($#,##0)" Next Next Any help would be great. Thanks! Jason *** Sent via Devdex http://www.devdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Summing every third cell
see worksheet.functions for subj
sum every other row in column -- Don Guillett SalesAid Software "Jason Hancock" wrote in message ... Well, I've tried several different things, but have not been successful. I'm trying to sum every third row of a particular column (i.e. A2+A5+...) What I have written so far is: For n = 2 To 233 Step 3 For m = 4 To 15 Step 1 Cells(236, m).FormulaR1C1 = ?????? Cells(236, m).NumberFormat = "$#,##0_);[Red]($#,##0)" Next Next Any help would be great. Thanks! Jason *** Sent via Devdex http://www.devdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Summing every third cell
Jason Hancock wrote:
Well, I've tried several different things, but have not been successful. I'm trying to sum every third row of a particular column (i.e. A2+A5+...) Sub a() Dim sSum As Double, i As Long For i = 2 To 11 Step 3 sSum = sSum + Application.Sum(Range("A" & i)) Next End Sub Alan Beban |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Summing every third cell
Jason Hancock wrote:
Well, I've tried several different things, but have not been successful. I'm trying to sum every third row of a particular column (i.e. A2+A5+...) Without using VBA you can insert the following in the first cell of an empty column (say, Column N) =INDIRECT("A"&3*ROW()-1) Then in the first cell of the next column (say, Column O) =SUM(N:N) The desired result will be in Cell O1 Alan Beban |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Summing every third cell
I've put this together, however I'm getting a runtime error 1004.
Anything I'm missing? For i = 2 To 233 Step 3 For n = 3 To 15 Step 1 Cells(236, n).Formula = sSum = sSum + Application.Sum(Range(n & i)) Cells(236, n).NumberFormat = "$#,##0_);[Red]($#,##0)" Next Next *** Sent via Devdex http://www.devdex.com *** Don't just participate in USENET...get rewarded for it! |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Summing every third cell
Or in one cell:
=SUMPRODUCT((A3:A200)*(MOD(ROW(A3:A200)-ROW(A3),3)=0)) -- Best Regards Leo Heuser Followup to newsgroup only please. "Alan Beban" skrev i en meddelelse ... Jason Hancock wrote: Well, I've tried several different things, but have not been successful. I'm trying to sum every third row of a particular column (i.e. A2+A5+...) Without using VBA you can insert the following in the first cell of an empty column (say, Column N) =INDIRECT("A"&3*ROW()-1) Then in the first cell of the next column (say, Column O) =SUM(N:N) The desired result will be in Cell O1 Alan Beban |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Summing every third cell
Leo Heuser wrote:
Or in one cell: =SUMPRODUCT((A3:A200)*(MOD(ROW(A3:A200)-ROW(A3),3)=0)) I take it that to sum A2,A5,A8,etc., it should be A2 instead of A3? Alan Beban |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Summing every third cell
"Alan Beban" skrev i en meddelelse ... Leo Heuser wrote: Or in one cell: =SUMPRODUCT((A3:A200)*(MOD(ROW(A3:A200)-ROW(A3),3)=0)) I take it that to sum A2,A5,A8,etc., it should be A2 instead of A3? Alan Beban You're not a man easily fooled <g Thanks. LeoH |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ignoring text data in a cell when summing values in the same cell | New Users to Excel | |||
Summing every third cell | Excel Worksheet Functions | |||
Summing every other cell in a column? | Excel Worksheet Functions | |||
Summing Every 40th cell? | Excel Worksheet Functions | |||
summing cell into one | Excel Worksheet Functions |