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
 

Some videos you may like

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Misca

Well-known Member
Joined
Aug 12, 2009
Messages
1,571
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).
 

Dili1234

New Member
Joined
May 16, 2013
Messages
5
Thank you very much.................... :)
 

Dili1234

New Member
Joined
May 16, 2013
Messages
5
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...........
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
44,434
Office Version
365
Platform
Windows
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
214
10
32
43
54
65
76
87
9
10
SUM N rows
 

Watch MrExcel Video

Forum statistics

Threads
1,095,786
Messages
5,446,492
Members
405,404
Latest member
clead

This Week's Hot Topics

Top