Example - In below excel macro example, two numbers a and b will be added .
Code -
a = activesheet.range("A1").value
b = activesheet.range("A2").value
activesheet.range("A3").value = a+b
In this example, cell A3 will have the sum of two cells A1 and A2.
This is how we can add two numbers in excel macro.
Code -
a = activesheet.range("A1").value
b = activesheet.range("A2").value
activesheet.range("A3").value = a+b
In this example, cell A3 will have the sum of two cells A1 and A2.
This is how we can add two numbers in excel macro.
No comments:
Post a Comment