ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Adding actual cells in a function (https://www.excelbanter.com/excel-discussion-misc-queries/126422-adding-actual-cells-function.html)

richardwo

Adding actual cells in a function
 
Hello,

I am trying to design a formula to add cells together when another condition
is met but am struggling.

A B
1 10 2
2 7
3 9

What I need is a formula that subtotals X amount of rows when a condition is
met. So in the example, when B11 I want the formula to add cells A1+1 (e.g.
cells A1:A2). This is for a very large database and the values for B vary
considerably, and I wondered whether there was a way of using a formula to
add cells to a current cell reference. Like A1+(1 cell).

Thanks

Dave Peterson

Adding actual cells in a function
 
Maybe something like:

=SUM(OFFSET(A1,0,0,B1+1,1))


richardwo wrote:

Hello,

I am trying to design a formula to add cells together when another condition
is met but am struggling.

A B
1 10 2
2 7
3 9

What I need is a formula that subtotals X amount of rows when a condition is
met. So in the example, when B11 I want the formula to add cells A1+1 (e.g.
cells A1:A2). This is for a very large database and the values for B vary
considerably, and I wondered whether there was a way of using a formula to
add cells to a current cell reference. Like A1+(1 cell).

Thanks


--

Dave Peterson


All times are GMT +1. The time now is 01:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com