Message box

  • Thread starter Thread starter Gordy99
  • Start date Start date
G

Gordy99

I have a cell that checks the vertical totals with the horizontal totals and
shows the difference if they are difference.
I would like to add a pop up message box if they are different using sheet
code.
Thanks,
Gordy
 
Right click the sheet tab and select view code. Add the following. You will
need to change the cell reference...

Private Sub Worksheet_Change(ByVal Target As Range)
If Round(Range("A1"), 3) <> 0 Then MsgBox "Out of Balance"
End Sub
 
Surely, vertical totals will be a sum of the column, horizontal totals will
be a sum of the row, so they will be different?

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top