![]() |
#1
|
|||
|
|||
![]()
Hello,
I have a large table of more than 2000 rows, and 5 columns. The values of these cells are either 1 or 0. For each column I want to be able to count the number of 1s in blocks of 20 rows starting from the first row. Example: For each column count the number of 1s in the first 20 cells (A1:A20), then in cells 21 to 41 (A21:A41), then from 42 to 62 and so on. Any help is appreciated. Many thanks, egit |
#2
|
||||
|
||||
![]()
Are you sure this is blocks of 20? The range A21:A41 has 21 cells, as does A42:A62
I will assume all blocks are 20 cells and you want the data compiled in a column starting in the first row. Put a formula in cell H1 with this value =SUM(OFFSET($A$1,(ROW()-1)*20,0,20,1)) Then copy this formula down for as many rows as you need.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
||||
|
||||
![]()
An option to avoid the OFFSET volatile function
Code:
=SUM(INDEX($A$1:$A$100,((ROW()-1)*4+1)):INDEX($A$1:$A$100,ROW()*4))
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#4
|
|||
|
|||
![]()
Many thanks, both solutions work.
|
#5
|
||||
|
||||
![]()
Please mark thread as solved ( see Thread tools). Thx
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
![]() |
Tags |
count, offset, row |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
wheddingsjr | Excel | 4 | 09-01-2020 09:52 PM |
How to create a Man Hour Resource with fixed durations and fixed Work | jayreb31 | Project | 0 | 07-03-2019 01:14 PM |
![]() |
ketanco | Project | 1 | 11-24-2014 03:46 PM |
![]() |
Evgeny | Project | 3 | 01-03-2013 06:45 AM |
![]() |
Joeb | Project | 3 | 06-25-2012 04:18 PM |