close

I need a formula that will sum every x number of cells. For example: I have
data in every 8th cell and I want to write a formula that totals that data.
Is the only way to do that to write my formula =sum(C1...and hold my ctrl key
down while manually selecting each cell...C9,C17,C25) Or can a formula be
written to sum each 8th cell??

This seemed to work:

=SUMPRODUCT(--((MOD(ROW(E1:E25), 8))= 1),--(E1:E25))

--
Kevin Vaughnquot;Kell2604quot; wrote:

gt; I need a formula that will sum every x number of cells. For example: I have
gt; data in every 8th cell and I want to write a formula that totals that data.
gt; Is the only way to do that to write my formula =sum(C1...and hold my ctrl key
gt; down while manually selecting each cell...C9,C17,C25) Or can a formula be
gt; written to sum each 8th cell??

Perhaps:
An array formula. The values are stored in a range named Data

{SUM(IF(MOD(ROW(INDIRECT(quot;1:quot;amp;COUNT(Data)))-1,8)=0,Data,quot;quot;))}

quot;Kell2604quot; wrote:

gt; I need a formula that will sum every x number of cells. For example: I have
gt; data in every 8th cell and I want to write a formula that totals that data.
gt; Is the only way to do that to write my formula =sum(C1...and hold my ctrl key
gt; down while manually selecting each cell...C9,C17,C25) Or can a formula be
gt; written to sum each 8th cell??

Thanks Kevin!

Can I just copy and paste this into Excel? I have tried that and I'm
getting an error (# VALUE) I did change the cell range to reflect the cell
range in my spreadsheet.

quot;Kevin Vaughnquot; wrote:

gt; This seemed to work:
gt;
gt; =SUMPRODUCT(--((MOD(ROW(E1:E25), 8))= 1),--(E1:E25))
gt;
gt; --
gt; Kevin Vaughn
gt;
gt;
gt; quot;Kell2604quot; wrote:
gt;
gt; gt; I need a formula that will sum every x number of cells. For example: I have
gt; gt; data in every 8th cell and I want to write a formula that totals that data.
gt; gt; Is the only way to do that to write my formula =sum(C1...and hold my ctrl key
gt; gt; down while manually selecting each cell...C9,C17,C25) Or can a formula be
gt; gt; written to sum each 8th cell??

Based on the test I just did, it probably means that in at least one of those
rows that is being summed, the value is actually test. BTW, you should
change the range to suit your needs. In the meantime, I will see what I can
do so that it won't give the #value error.

--
Kevin Vaughnquot;Kell2604quot; wrote:

gt; Thanks Kevin!
gt;
gt; Can I just copy and paste this into Excel? I have tried that and I'm
gt; getting an error (# VALUE) I did change the cell range to reflect the cell
gt; range in my spreadsheet.
gt;
gt; quot;Kevin Vaughnquot; wrote:
gt;
gt; gt; This seemed to work:
gt; gt;
gt; gt; =SUMPRODUCT(--((MOD(ROW(E1:E25), 8))= 1),--(E1:E25))
gt; gt;
gt; gt; --
gt; gt; Kevin Vaughn
gt; gt;
gt; gt;
gt; gt; quot;Kell2604quot; wrote:
gt; gt;
gt; gt; gt; I need a formula that will sum every x number of cells. For example: I have
gt; gt; gt; data in every 8th cell and I want to write a formula that totals that data.
gt; gt; gt; Is the only way to do that to write my formula =sum(C1...and hold my ctrl key
gt; gt; gt; down while manually selecting each cell...C9,C17,C25) Or can a formula be
gt; gt; gt; written to sum each 8th cell??

This array entered formula seems to take care of the possibility of text (not
test.)

=SUM(IF(ISNUMBER(E8:E32)*((MOD(ROW(E8:E32), 8))= 1),(E8:E32),0))

Entered with cntl-shift-enter

--
Kevin Vaughnquot;Kevin Vaughnquot; wrote:

gt; Based on the test I just did, it probably means that in at least one of those
gt; rows that is being summed, the value is actually test. BTW, you should
gt; change the range to suit your needs. In the meantime, I will see what I can
gt; do so that it won't give the #value error.
gt;
gt; --
gt; Kevin Vaughn
gt;
gt;
gt; quot;Kell2604quot; wrote:
gt;
gt; gt; Thanks Kevin!
gt; gt;
gt; gt; Can I just copy and paste this into Excel? I have tried that and I'm
gt; gt; getting an error (# VALUE) I did change the cell range to reflect the cell
gt; gt; range in my spreadsheet.
gt; gt;
gt; gt; quot;Kevin Vaughnquot; wrote:
gt; gt;
gt; gt; gt; This seemed to work:
gt; gt; gt;
gt; gt; gt; =SUMPRODUCT(--((MOD(ROW(E1:E25), 8))= 1),--(E1:E25))
gt; gt; gt;
gt; gt; gt; --
gt; gt; gt; Kevin Vaughn
gt; gt; gt;
gt; gt; gt;
gt; gt; gt; quot;Kell2604quot; wrote:
gt; gt; gt;
gt; gt; gt; gt; I need a formula that will sum every x number of cells. For example: I have
gt; gt; gt; gt; data in every 8th cell and I want to write a formula that totals that data.
gt; gt; gt; gt; Is the only way to do that to write my formula =sum(C1...and hold my ctrl key
gt; gt; gt; gt; down while manually selecting each cell...C9,C17,C25) Or can a formula be
gt; gt; gt; gt; written to sum each 8th cell??

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()