• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

EXCEL MACRO HELP

thakur

Member
Hi,

Need help in writing excel macro which takes two different numbers from the user via a popup box and provides the sum of these two numbers in one cell..

Regards,
Thakur
 
something like this?
Code:
Sub DoMath()
Dim FirstNum As Double
Dim SecNum As Double

FirstNum = InputBox("What is the first number?")
SecNum = InputBox("What is the second number?")

'Output value to A2
Range("A2").Value = FirstNum + SecNum
End Sub
 
Back
Top