Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Sum x number of right cells after finding first cell more than 0.

Hi

I am finding a solution (formula) to automatically sum (3 or 12) cells
on the right after encountering first right cell greater than 0.

Currently, this is done manually. (eg. 3.9 is the sum of 2.9 (Aug) +
0.5 (Sep) + 0.4 (Oct).)

Question is there a way to do this automatically because there are
thousands of rows..and this will drive me crasy in maintaining this
worksheet effectively. Thanks.

First First
3M 12M Jul Aug Sep Oct Nov Dec ....................
-------------------------------------------------------------------------------------------------------------------------------------------
3.9 5.4 0.0 2.9 0.5 0.4 0.3 0.2 ....................
1.0 2.2 0.0 0.9 0.0 0.2 0.0 0.4 ....................
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ....................
3.2 5.2 0.0 0.0 0.0 1.9 1.3 0.9 ....................
3.1 5.1 0.0 0.0 0.0 0.5 1.7 0.9 ....................
2.6 3.9 0.0 0.0 0.0 0.4 1.1 1.1 ....................
........................
........................

Ivan
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Sum x number of right cells after finding first cell more than 0.

Hi

One way would be with the array entered formula
{=SUM(OFFSET(INDEX(2:2,MATCH(TRUE,2:20,2:2)),0,0, 1,3))}

To enter, or amend, an array formula use Control+Shift+Enter (CSE) not just
Enter
When you use CSE, Excel will insert the curly braces { } around the
formula. Do not type them yourself.

The 3 at the end of the formula is for 3 months.
Change this value for any other number of months required

--

Regards
Roger Govier

"Learn" wrote in message
...
Hi

I am finding a solution (formula) to automatically sum (3 or 12) cells
on the right after encountering first right cell greater than 0.

Currently, this is done manually. (eg. 3.9 is the sum of 2.9 (Aug) +
0.5 (Sep) + 0.4 (Oct).)

Question is there a way to do this automatically because there are
thousands of rows..and this will drive me crasy in maintaining this
worksheet effectively. Thanks.

First First
3M 12M Jul Aug Sep Oct Nov Dec ....................
-------------------------------------------------------------------------------------------------------------------------------------------
3.9 5.4 0.0 2.9 0.5 0.4 0.3 0.2 ....................
1.0 2.2 0.0 0.9 0.0 0.2 0.0 0.4 ....................
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ....................
3.2 5.2 0.0 0.0 0.0 1.9 1.3 0.9 ....................
3.1 5.1 0.0 0.0 0.0 0.5 1.7 0.9 ....................
2.6 3.9 0.0 0.0 0.0 0.4 1.1 1.1 ....................
.......................
.......................

Ivan


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 256
Default Sum x number of right cells after finding first cell more than 0.

For the first 3 months, try the following formula that needs to be
confirmed with CONTROL+SHIFT+ENTER...

=SUM(INDEX(C2:H2,MATCH(TRUE,C2:H20,0)):INDEX(C2:H 2,MATCH(TRUE,C2:H20,0)
+3-1))

For the first 12 months, replace +3 with +12. Adjust the ranges
accordingly.

Hope this helps!

In article
,
Learn wrote:

Hi

I am finding a solution (formula) to automatically sum (3 or 12) cells
on the right after encountering first right cell greater than 0.

Currently, this is done manually. (eg. 3.9 is the sum of 2.9 (Aug) +
0.5 (Sep) + 0.4 (Oct).)

Question is there a way to do this automatically because there are
thousands of rows..and this will drive me crasy in maintaining this
worksheet effectively. Thanks.

First First
3M 12M Jul Aug Sep Oct Nov Dec ....................
------------------------------------------------------------------------------
-------------------------------------------------------------
3.9 5.4 0.0 2.9 0.5 0.4 0.3 0.2 ....................
1.0 2.2 0.0 0.9 0.0 0.2 0.0 0.4 ....................
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ....................
3.2 5.2 0.0 0.0 0.0 1.9 1.3 0.9 ....................
3.1 5.1 0.0 0.0 0.0 0.5 1.7 0.9 ....................
2.6 3.9 0.0 0.0 0.0 0.4 1.1 1.1 ....................
.......................
.......................

Ivan

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Sum x number of right cells after finding first cell more than 0.

On Dec 8, 8:22 pm, Domenic wrote:
For the first 3 months, try the following formula that needs to be
confirmed with CONTROL+SHIFT+ENTER...

=SUM(INDEX(C2:H2,MATCH(TRUE,C2:H20,0)):INDEX(C2:H 2,MATCH(TRUE,C2:H20,0)
+3-1))

For the first 12 months, replace +3 with +12. Adjust the ranges
accordingly.

Hope this helps!

In article
,



Learn wrote:
Hi


I am finding a solution (formula) to automatically sum (3 or 12) cells
on the right after encountering first right cell greater than 0.


Currently, this is done manually. (eg. 3.9 is the sum of 2.9 (Aug) +
0.5 (Sep) + 0.4 (Oct).)


Question is there a way to do this automatically because there are
thousands of rows..and this will drive me crasy in maintaining this
worksheet effectively. Thanks.


First First
3M 12M Jul Aug Sep Oct Nov Dec ....................
-------------------------------------------------------------------------------
-------------------------------------------------------------
3.9 5.4 0.0 2.9 0.5 0.4 0.3 0.2 ....................
1.0 2.2 0.0 0.9 0.0 0.2 0.0 0.4 ....................
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ....................
3.2 5.2 0.0 0.0 0.0 1.9 1.3 0.9 ....................
3.1 5.1 0.0 0.0 0.0 0.5 1.7 0.9 ....................
2.6 3.9 0.0 0.0 0.0 0.4 1.1 1.1 ....................
.......................
.......................


Ivan- Hide quoted text -


- Show quoted text -


The solution to this issue is given by Roger and Domenic as follows:
{=SUM(OFFSET(INDEX(2:2,MATCH(TRUE,2:20,2:2)),0,0, 1,3))} = using CTRL
+ SHIFT + ENTER

Thanks and it works perfectly. Cheers!
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,180
Default Sum x number of right cells after finding first cell more than 0.

If the formula was placed in the position shown
in the example, wouldn't you get a circular reference?
If the string of zeros extended into the last 12 cells
of your data and there was unrelated data following
your data, would you not get a wrong answer?




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
finding the maximum number of used cells in any column of a table Tim Excel Worksheet Functions 6 October 15th 07 11:00 PM
Finding the Row number based on contents of a cell Chris Youlden Excel Worksheet Functions 5 September 6th 07 04:38 PM
Finding Number of cells in a column of other sheet having a specific word in them [email protected] New Users to Excel 5 February 21st 07 01:51 PM
Finding cells with a specific number of characters Kamran Excel Discussion (Misc queries) 6 March 29th 06 11:04 PM
finding a particular cell in another worksheet whose row number ch Andrew Excel Discussion (Misc queries) 1 September 12th 05 01:36 PM


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

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"