![]() |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 12:14 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com