Welcome to the message board!
I believe the OFFSET-function is what you're looking for.
Here's a good introduction to the OFFSET-formula: OFFSET formula – Explained | Chandoo.org - Learn Microsoft Excel Online
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
We changing the value in N=5
(M/M/S)FIFS/INF/N) No of Server 3 l 0.20 n Coeffient P(n) nP(n) m 0.4 0 1 0.060657 0 P(0) 0.060657 q 0.5 1 2.5 0.151643 0.151643 Ls 2.245156 2 5 0.303286 0.606571 N 5 3 7.5 0.454928 1.364785 4 0.416666667 0.025274 0.101095 5 0.069444444 0.004212 0.021061
Welcome to the message board!
I believe the OFFSET-function is what you're looking for.
Here's a good introduction to the OFFSET-formula: OFFSET formula – Explained | Chandoo.org - Learn Microsoft Excel Online
Could you help me little more ................
I couldn't get it.
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).
Thank you very much....................
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.
SUM N rows
A B C D 1 Data N SUM 2 1 4 10 3 2 4 3 5 4 6 5 7 6 8 7 9 10
Spreadsheet Formulas
Cell Formula D2 =SUM(A2:INDEX(A2:A8,C2))
Excel tables to the web >> Excel Jeanie HTML 4
Hope this helps, good luck.
Peter
Excel 365 - Windows 10
- Want to help your helpers by posting a small, copyable, screen shot directly in your post? Look here
- If posting vba code, please use Code Tags - like this [code]Paste code here[/code] - or use the VBHTML Maker
- Read: Forum Rules, Forum Use Guidelines, & FAQ
Thank you.............very much to both of you
Like this thread? Share it with others