Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Summation over a range

Does anyone know of an easy way to sum a function over a range of values such
as from k=0 to k=N, where N is a variable in a cell?

Thanks,
--
P25 System Architect
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Summation over a range

=SUM(C1:INDEX(C:C,B1))


where B1 holds the variable and C is the column you want to sum based on the
variable


--


Regards,


Peo Sjoblom



"P25_Sys_Arch" wrote in message
...
Does anyone know of an easy way to sum a function over a range of values
such
as from k=0 to k=N, where N is a variable in a cell?

Thanks,
--
P25 System Architect



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 84
Default Summation over a range

If you want to do it all in one cell, you can hack the row function
into a counter:

Row(1:10)
Row(Indirect("1:" & A1))

E.g., to sum the first 10 terms of the harmonic series, with 10 in A1:

=SUM(1/ROW(INDIRECT("1:" & A1)))

array-entered with Ctrl+Shift+Enter, so that Excel bounds the formula
with braces { }, otherwise only the first value in Row will be used.

Note that you cannot use 0 in this counter, as Excel has no 0th row.

- David



On Sep 20, 3:46 pm, P25_Sys_Arch
wrote:
Does anyone know of an easy way to sum a function over a range of values such
as from k=0 to k=N, where N is a variable in a cell?

Thanks,
--
P25 System Architect



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
summation ExcelQuestion Excel Worksheet Functions 11 June 27th 07 02:28 AM
Summation of time Bikertyke Excel Worksheet Functions 7 November 27th 06 10:19 AM
Summation problem with Range jesmin Excel Discussion (Misc queries) 2 March 15th 06 11:27 PM
Summation from a to b jeblunk Excel Worksheet Functions 3 December 4th 05 02:14 PM
Summation Problem cdehrlich Excel Worksheet Functions 2 November 8th 04 05:54 PM


All times are GMT +1. The time now is 09:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"