ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I add values in 2 cells using a command button (https://www.excelbanter.com/excel-programming/334748-how-can-i-add-values-2-cells-using-command-button.html)

Dr.H.Subramanian[_2_]

How can I add values in 2 cells using a command button
 
How can I add values in 2 cells using a command button
Example - Values in A1 and A2 to be added and shown in A3 at the click of a
command button (ADD) which is inserted from the tools box.

JE McGimpsey

How can I add values in 2 cells using a command button
 
One way:

Public Sub CommandButton1_Click()
Range("A3").Value = Range("A1").Value + Range("A2").Value
End Sub

In article ,
"Dr.H.Subramanian" wrote:

How can I add values in 2 cells using a command button
Example - Values in A1 and A2 to be added and shown in A3 at the click of a
command button (ADD) which is inserted from the tools box.



All times are GMT +1. The time now is 02:45 AM.

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