Formula

G

Guest

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??
 
G

Guest

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

{SUM(IF(MOD(ROW(INDIRECT("1:"&COUNT(Data)))-1,8)=0,Data,""))}
 
G

Guest

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.
 
G

Guest

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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top