Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default calculate sum of range


I posted previoulsy that I needed to select the cell below a column o
numbers in order to calculate a sum. I have that.

range("I1").End(xlDown).Offset(1, 0).Select 'Next Blank Cell in colum
i

I need coding to add to this line which will allow me to calculate th
sum of the column. I need the coding to account for spreadsheets wit
different numbers of rows.

Thanks

Pau

--
Paul
-----------------------------------------------------------------------
Paulg's Profile: http://www.excelforum.com/member.php...fo&userid=3607
View this thread: http://www.excelforum.com/showthread.php?threadid=56215

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default calculate sum of range

One way:

With Range("I1").End(xlDown)
.Offset(1, 0).Value = _
Application.Sum(Cells(1, .Column).Resize(.Row))
End With

In article ,
Paulg wrote:

I posted previoulsy that I needed to select the cell below a column of
numbers in order to calculate a sum. I have that.

range("I1").End(xlDown).Offset(1, 0).Select 'Next Blank Cell in column
i

I need coding to add to this line which will allow me to calculate the
sum of the column. I need the coding to account for spreadsheets with
different numbers of rows.

Thanks

Paul

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default calculate sum of range

Range("I1").End(xlDown).Offset(1, 0).Value = "=SUM(I1:I" & _
Range("I1").End(xlDown).Row & ")"

HTH

Die_Another_Day
Paulg wrote:
I posted previoulsy that I needed to select the cell below a column of
numbers in order to calculate a sum. I have that.

range("I1").End(xlDown).Offset(1, 0).Select 'Next Blank Cell in column
i

I need coding to add to this line which will allow me to calculate the
sum of the column. I need the coding to account for spreadsheets with
different numbers of rows.

Thanks

Paul


--
Paulg
------------------------------------------------------------------------
Paulg's Profile: http://www.excelforum.com/member.php...o&userid=36077
View this thread: http://www.excelforum.com/showthread...hreadid=562156


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default calculate sum of range


Thanks,

I would have never got that.

Paul


--
Paulg
------------------------------------------------------------------------
Paulg's Profile: http://www.excelforum.com/member.php...o&userid=36077
View this thread: http://www.excelforum.com/showthread...hreadid=562156

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 to calculate variance and range Tele Excel Discussion (Misc queries) 1 July 17th 09 02:51 AM
Calculate Range saman110 via OfficeKB.com Excel Discussion (Misc queries) 3 February 10th 08 08:54 PM
Calculate Range SRV....Frenzy Excel Worksheet Functions 1 April 4th 07 12:10 PM
How do I calculate within a range? Jdd561 Excel Worksheet Functions 5 November 5th 06 06:09 PM
Calculate Date range Calculate Date range Excel Worksheet Functions 4 September 6th 05 10:12 AM


All times are GMT +1. The time now is 04:05 AM.

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"