Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Sum Column above current cell dynamically using function call

I want to sum the column above current cell using the formula

=SUM(C3:activecell's row - 1)

My question is how do I determine the row number above the current cell.
I know CELL("row") returns the current row but could not find a way of
using this in the formula.

I know there are ways round this eg. SUM(C3:Cn) where n is manually entered
but I want to know of a way to do it using an Excel function.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default Sum Column above current cell dynamically using function call

Maybe something like

=SUM(C3:INDIRECT(ADDRESS(ROW(),3)))

HTH
Kostis Vezerides

On Sep 14, 6:51*pm, TopSlice
wrote:
I want to sum the column above current cell using the formula

=SUM(C3:activecell's row - 1)

My question is how do I determine the row number above the current cell.
I know CELL("row") returns the current row but could not *find a way of
using this in the formula.

I know there are ways round this eg. SUM(C3:Cn) *where n is manually entered
but I want to know of a way to do it using an Excel function.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Sum Column above current cell dynamically using function call

TopSlice wrote:
I want to sum the column above current cell using the formula

=SUM(C3:activecell's row - 1)

My question is how do I determine the row number above the current cell.
I know CELL("row") returns the current row but could not find a way of
using this in the formula.

I know there are ways round this eg. SUM(C3:Cn) where n is manually entered
but I want to know of a way to do it using an Excel function.


Try this:

=IF(CELL("row")3,SUM(INDIRECT("C3:C"&CELL("row")-1)),"")
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Sum Column above current cell dynamically using function call

Hi,

Try this

=SUM(INDIRECT("C3:C"&CELL("Row")-1))

Mike

"TopSlice" wrote:

I want to sum the column above current cell using the formula

=SUM(C3:activecell's row - 1)

My question is how do I determine the row number above the current cell.
I know CELL("row") returns the current row but could not find a way of
using this in the formula.

I know there are ways round this eg. SUM(C3:Cn) where n is manually entered
but I want to know of a way to do it using an Excel function.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Sum Column above current cell dynamically using function call

Another one:
=SUM(INDIRECT("r3c3:r[-1]c",FALSE))

R3C3 is row3, column 3
r[-1]c is row of the cell with the formula - 1, same column as the cell with
the formula

And another one:
=SUM(C3:OFFSET(C11,-1,0))
(where c11 is the cell getting the formula)


But why not just use the address of the cell that's above the cell with the
formula.


TopSlice wrote:

I want to sum the column above current cell using the formula

=SUM(C3:activecell's row - 1)

My question is how do I determine the row number above the current cell.
I know CELL("row") returns the current row but could not find a way of
using this in the formula.

I know there are ways round this eg. SUM(C3:Cn) where n is manually entered
but I want to know of a way to do it using an Excel function.


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Sum Column above current cell dynamically using function call

Hi,

Why not simply =sum(C3:C7). This assumes that your current cell is C8

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"TopSlice" wrote in message
...
I want to sum the column above current cell using the formula

=SUM(C3:activecell's row - 1)

My question is how do I determine the row number above the current cell.
I know CELL("row") returns the current row but could not find a way of
using this in the formula.

I know there are ways round this eg. SUM(C3:Cn) where n is manually
entered
but I want to know of a way to do it using an Excel function.

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 55
Default Sum Column above current cell dynamically using function call

Hi Topslice,

=sum(c3:indirect("c:"&row()-1))
--
If this post helps click Yes
---------------
Peggy Shepard


"Ashish Mathur" wrote:

Hi,

Why not simply =sum(C3:C7). This assumes that your current cell is C8

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"TopSlice" wrote in message
...
I want to sum the column above current cell using the formula

=SUM(C3:activecell's row - 1)

My question is how do I determine the row number above the current cell.
I know CELL("row") returns the current row but could not find a way of
using this in the formula.

I know there are ways round this eg. SUM(C3:Cn) where n is manually
entered
but I want to know of a way to do it using an Excel function.

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Sum Column above current cell dynamically using function call

Thanks guys - its been a great help.
My findings from your suggestions a


=SUM(INDIRECT("r3c3:r[-1]c",FALSE)) works


=SUM(INDIRECT("C3:C"&CELL("Row")-1)) works but if you insert a row the
value changes -
how do you make it automatically
recalc the sum?


=SUM(C3:OFFSET(C11,-1,0)) works but not if need to update C3 if insert a
row above R3 or delete row 3


=sum(c3:indirect("c:"&row()-1)) does not work


Changed =SUM(C3:INDIRECT(ADDRESS(ROW(),3) ) ) =

=SUM(D4:INDIRECT(ADDRESS(ROW()-1,COLUMN(),4))) which works

Thanks Again
TopSlice
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
How do I call current computer time to a cell? Carol G. Excel Worksheet Functions 9 November 14th 08 04:37 AM
Use reference text from one cell in another function call Randy Excel Worksheet Functions 3 March 10th 08 05:31 PM
How do i call a function to a cell? Bill Excel Worksheet Functions 3 February 17th 07 12:54 AM
Can I get current #row or #column in cell formula? ryany Excel Discussion (Misc queries) 2 February 13th 06 11:27 AM
Get current cell with VBA function vbphil Excel Worksheet Functions 5 April 4th 05 11:23 PM


All times are GMT +1. The time now is 04:41 PM.

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

About Us

"It's about Microsoft Excel"