How to give range to find the sum

Dili1234

New Member
Joined
May 16, 2013
Messages
5
I'm doing a statistics workbook there I need to add untill the given value in the cell
ex: if gave 5 in the cell we want to get the total until only to 5th cells
(M/M/S):(FIFS/INF/N)
No of Server
3
l0.20nCoeffientP(n)nP(n)
m0.4010.0606570P(0)0.060657
q0.512.50.1516430.151643Ls2.245156
250.3032860.606571
N
5
37.50.4549281.364785
40.4166666670.0252740.101095
5
0.069444444
0.0042120.021061

<colgroup><col><col span="3"><col><col span="6"></colgroup><tbody>
</tbody>
We changing the value in N=5
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
The OFFSET function does not return a value but a range that you want to use in your actual calculations.

The syntax is

=OFFSET(starting point, rows to move, columns to move, height, width)

Where:
Starting point is the base range (= usually a single cell). This is the anchor point of your OFFSET function.
The Rows / Columns to move set how many rows / columns you want to move from the starting point before the actual range begins: OFFSET(B2,-1,1) means the OFFSET-range moves one row up and one column to the right from B2 (=C1).
The height and width set the actual size of your range: OFFSET(B2,-1,1,5,2) means you want your range to be 5 rows tall and 2 columns wide, starting 1 row up and one column right from B2. The formula returns the range C1:D5.

=SUM(
OFFSET(B2,-1,1,5,2)) means you want to SUM the values in your OFFSET range. The static formula for the same thing would be SUM(C1:D5).

Often times you replace the static rows / columns / heights / widths with formulas returning the desired value (for example COUNT to return how many rows of data there is or MATCH to find a certain value from your list).
 
Upvote 0
How to get the content of a cell to offset function.because in my problem range is determine by N
if N=5 then I have to get the sum of 5 rows and if N=3 then I have to get the sum of 3 rows like wise it goes on...........
 
Upvote 0
How to get the content of a cell to offset function.because in my problem range is determine by N
if N=5 then I have to get the sum of 5 rows and if N=3 then I have to get the sum of 3 rows like wise it goes on...........
I can't really see what you are trying to do in post #1, but to sum N rows of a range, you can do as follows. Hopefully you can then apply that to your actual problem, or describe your problem more clearly.

As suggested by Misca, this is also possible by using OFFSET but that is a volatile function so I would avoid that when there are feasible non-volatile alternatives like below.

Excel Workbook
ABCD
1DataNSUM
21410
32
43
54
65
76
87
9
10
SUM N rows
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,383
Members
448,955
Latest member
BatCoder

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top