Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default How to divide array formula?

Hello every one,
I got this array:
{0,0,1,1,0,1,1,0,1,1,1,1}
Is there a way to SUM every 3 numbers?
Desired result:
SUM (0,0,1)
SUM (1,0,1)
SUM (1,0,1)
SUM (1,1,1)
It would return:
1
2
2
3
Thank you,
Guntars

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 434
Default How to divide array formula?

hi, !

better if you write-down your array (say) to range [B2:M2]
and start with a formula like one of the following:

op1: =sumproduct(subtotal(9,offset($b$2,,row(a1)*3-3,,3)))
op2: =sum(index($b$2:$m$2,row(a1)*3-2):index($b$2:$m$2,row(a1)*3))

copy/drag down as needed

hth,
hector.

__ OP __
Hello every one,
I got this array:
{0,0,1,1,0,1,1,0,1,1,1,1}
Is there a way to SUM every 3 numbers?
Desired result:
SUM (0,0,1)
SUM (1,0,1)
SUM (1,0,1)
SUM (1,1,1)
It would return:
1
2
2
3
Thank you,



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 434
Default How to divide array formula?

hi, again !

ok, if you don't want write-down your array, you will need an(other) array for the every 3 numbers
in a way that this (new) array can be multiplied by your 12 elements array

let's say you put three "ones" (1) in the range [K1:M1]
you can start your sum operation (every 3) with the following CSE (array) formula:

=sum({0,0,1,1,0,1,1,0,1,1,1,1}*n(transpose(offset( $b$1,,row(indirect("1:12"))+9-(row(a1)*3-3)-1,,12))))

and copy/drag down as needed

hth,
hector.

__ previous __
better if you write-down your array (say) to range [B2:M2]
and start with a formula like one of the following:

op1: =sumproduct(subtotal(9,offset($b$2,,row(a1)*3-3,,3)))
op2: =sum(index($b$2:$m$2,row(a1)*3-2):index($b$2:$m$2,row(a1)*3))

copy/drag down as needed

__ OP __
Hello every one,
I got this array:
{0,0,1,1,0,1,1,0,1,1,1,1}
Is there a way to SUM every 3 numbers?
Desired result:
SUM (0,0,1)
SUM (1,0,1)
SUM (1,0,1)
SUM (1,1,1)
It would return:
1
2
2
3
Thank you,



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
DIVIDE FORMULA eric Excel Discussion (Misc queries) 2 August 21st 07 08:55 AM
Sum and Divide Formula error JaB Excel Worksheet Functions 7 April 19th 06 07:47 PM
formula to divide a monthly bill... Kim Excel Worksheet Functions 6 August 17th 05 09:29 PM
Divide one row over other row I dont wont to divide one number Rick Excel Discussion (Misc queries) 0 March 4th 05 07:13 PM
How do I divide, what would the formula look like? I forgot. Than. Carole Excel Worksheet Functions 3 February 1st 05 08:23 PM


All times are GMT +1. The time now is 02:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"