Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default How to repeatingly sum the next n cells?

Hello,

My data is organized in a worksheet like this:

1 jan | 2 jan | 3 jan | 4 jan | 5 jan | 6 jan | 7 jan | 8 jan | 9 jan
| 10 jan | 11 jan | 12 jan | 13 jan | 14 jan | etc.
| | | | | |
| | X | X | | | X
| | etc

So, in the first row, dates are stated and in the second row data is
filled. Now I want to count the blanks per week, so the result will be
a table like this:

week 1 | week 2 | week 3 | etc.
7 | 4 | 6 | etc.

Using the formula COUNTBLANK(A1:A7) doesn't seem to be the solution,
because dragging this formula to the right leads to COUNTBLANK(A2:A8)
instead of the correct calculation COUNTBLANK(A8:A14).
Can somebody help me with the correct formula?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default How to repeatingly sum the next n cells?

Hi

Surely if your data is going across the page, then you want
A2:G2 for your first 7 days, then H2:N2 etc.

Try
=COUNTA(OFFSET($A$2:$G$2,,(COLUMN(A1)-1)*7))

--
Regards
Roger Govier

wrote in message
...
Hello,

My data is organized in a worksheet like this:

1 jan | 2 jan | 3 jan | 4 jan | 5 jan | 6 jan | 7 jan | 8 jan | 9 jan
| 10 jan | 11 jan | 12 jan | 13 jan | 14 jan | etc.
| | | | | |
| | X | X | | | X
| | etc

So, in the first row, dates are stated and in the second row data is
filled. Now I want to count the blanks per week, so the result will be
a table like this:

week 1 | week 2 | week 3 | etc.
7 | 4 | 6 | etc.

Using the formula COUNTBLANK(A1:A7) doesn't seem to be the solution,
because dragging this formula to the right leads to COUNTBLANK(A2:A8)
instead of the correct calculation COUNTBLANK(A8:A14).
Can somebody help me with the correct formula?

Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default How to repeatingly sum the next n cells?

To do what you say...sorta:
=COUNTBLANK(INDIRECT("A"&-6+7*COLUMN(A1)&":A"&7*COLUMN(A1)))

If you copy this to the right, it will refere to A8:A14, then A15:A21.
Your question is confusing as you say "copy to the right". Copying
left/right changes the column, not the row.
But your example clearly has you changing the row, so that is what this
formula will do.

My main point is, are you wanting the reference to change from "A1:A7" to
"A8:A14", or do you really want "A1:G1" to change to "H1:N1"??

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


" wrote:

Hello,

My data is organized in a worksheet like this:

1 jan | 2 jan | 3 jan | 4 jan | 5 jan | 6 jan | 7 jan | 8 jan | 9 jan
| 10 jan | 11 jan | 12 jan | 13 jan | 14 jan | etc.
| | | | | |
| | X | X | | | X
| | etc

So, in the first row, dates are stated and in the second row data is
filled. Now I want to count the blanks per week, so the result will be
a table like this:

week 1 | week 2 | week 3 | etc.
7 | 4 | 6 | etc.

Using the formula COUNTBLANK(A1:A7) doesn't seem to be the solution,
because dragging this formula to the right leads to COUNTBLANK(A2:A8)
instead of the correct calculation COUNTBLANK(A8:A14).
Can somebody help me with the correct formula?

Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default How to repeatingly sum the next n cells?

Sorry that is counting the X's, you wanted the blanks so
=COUNTBLANK(OFFSET($A$2:$G$2,,(COLUMN(A1)-1)*7))


--
Regards
Roger Govier

"Roger Govier" <roger@technology4unospamdotcodotuk wrote in message
...
Hi

Surely if your data is going across the page, then you want
A2:G2 for your first 7 days, then H2:N2 etc.

Try
=COUNTA(OFFSET($A$2:$G$2,,(COLUMN(A1)-1)*7))

--
Regards
Roger Govier

wrote in message
...
Hello,

My data is organized in a worksheet like this:

1 jan | 2 jan | 3 jan | 4 jan | 5 jan | 6 jan | 7 jan | 8 jan | 9 jan
| 10 jan | 11 jan | 12 jan | 13 jan | 14 jan | etc.
| | | | | |
| | X | X | | | X
| | etc

So, in the first row, dates are stated and in the second row data is
filled. Now I want to count the blanks per week, so the result will be
a table like this:

week 1 | week 2 | week 3 | etc.
7 | 4 | 6 | etc.

Using the formula COUNTBLANK(A1:A7) doesn't seem to be the solution,
because dragging this formula to the right leads to COUNTBLANK(A2:A8)
instead of the correct calculation COUNTBLANK(A8:A14).
Can somebody help me with the correct formula?

Thanks!


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default How to repeatingly sum the next n cells?

Thanks guys,
I got it working. Thanks a lot for your help!
Regards,
Luc
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
Excel: match two cells in one sheet to two cells in another and return a third cells value Spence Excel Worksheet Functions 3 February 13th 11 05:33 AM
Cells won't change font color or show hi-lighted cells in document ROBIN Excel Discussion (Misc queries) 1 March 27th 08 09:39 PM
display a range of cells editible cells based on matching date Miki Excel Worksheet Functions 0 October 10th 07 03:27 PM
Setting of input cells as blue font and formula cells as black fon Sunnyskies Excel Discussion (Misc queries) 2 May 14th 07 05:27 PM
trying to create an (almost) circular formula between cells and data validated cells with lists KR Excel Worksheet Functions 0 May 12th 05 07:21 PM


All times are GMT +1. The time now is 04:30 AM.

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

About Us

"It's about Microsoft Excel"