ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Count values in Cells Across (https://www.excelbanter.com/excel-programming/314352-count-values-cells-across.html)

Shari[_4_]

Count values in Cells Across
 
I want to calculate the values in cell A1 across.

Eg. Cell A1 has a value of 36. I want to calculate the values across
in the 36 non blank cells located in the same worksheet.

Any help appreciated.
Thanks in advance

Simon Lloyd[_593_]

Count values in Cells Across
 

Hi, put this in a module and give it a keyboard shortcut so you ca
activate it, its just a macro recording of selecting cell A2 the
clicking on the sum symbol on the standard toolbar and then draggin
all the cells you want to calculate.

hope this helps
Simon
Sub cellcalculate()
Range("A2").Select
ActiveCell.FormulaR1C1 = "=SUM(R[-1]C:R[-1]C[36])"
Range("A2").Select
End Su

--
Simon Lloy
-----------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=27142



All times are GMT +1. The time now is 03:22 AM.

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