Creating a Pop-up Summary Box with Data

  • Thread starter Thread starter radhikachar
  • Start date Start date
R

radhikachar

Is it possible to create a pop-up or dialog box that can tell you the
sum of two cells? The values in the two cells will keep changing, but
I want the sum to pop up so it is easy to see. Thanks!
 
sure! example:

Sub msgbox_sum()

Dim numberone As Range
Dim numbertwo As Range
Dim ws As Worksheet

Set ws = ActiveSheet
Set numberone = ws.Range("b3")
Set numbertwo = ws.Range("b6")

MsgBox numberone + numbertwo


End Sub

change ranges to meet your needs.
susan
 
I'm sorry, I don't know much about visual basic. How can I get the
pop up display to say, "The total is" and then show the number? Is it
also possible to change the ranges so that one value might be on one
sheet, whereas the other value is on another?

Thank you very much!

sure! example:

Sub msgbox_sum()

Dim numberone As Range
Dim numbertwo As Range
Dim ws As Worksheet

Set ws = ActiveSheet
Set numberone = ws.Range("b3")
Set numbertwo = ws.Range("b6")

MsgBox numberone + numbertwo
I> End Sub
 
Select the two cells then right-click on the status bar and "Sum"

Or in a third cell enter =cell1 + cell2

A pop-up message would require VBA

Sub Sum_Range()
Set rng = Selection
MsgBox "The Sum is " & WorksheetFunction.Sum(rng)
End Sub


Gord Dibben MS Excel MVP
 
If you select two numeric cells, in the lower right corner of excel, you
should see the sum. It works for all cells selected.

Use the built in capabilities of the software.
 
Back
Top