ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   summing (https://www.excelbanter.com/excel-programming/277745-summing.html)

ChrisG[_4_]

summing
 
I have code to enter 0 or 1 in column H. When code
finishes I would like to add all values in column H and
place in Cell A1. How can I do this?

Ron de Bruin

summing
 
One way

Sub test()
Sheets("Sheet1").Range("A1").Value = _
Application.WorksheetFunction.Sum(Range("H:H"))
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"ChrisG" wrote in message ...
I have code to enter 0 or 1 in column H. When code
finishes I would like to add all values in column H and
place in Cell A1. How can I do this?




ChrisG[_4_]

summing
 

Thanks, I see.

-----Original Message-----
One way

Sub test()
Sheets("Sheet1").Range("A1").Value = _
Application.WorksheetFunction.Sum(Range("H:H"))
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"ChrisG" wrote in

message ...
I have code to enter 0 or 1 in column H. When code
finishes I would like to add all values in column H and
place in Cell A1. How can I do this?



.



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com