Beep on greater than zero

  • Thread starter Thread starter TaylorLeigh
  • Start date Start date
T

TaylorLeigh

I have an excel spreadsheet with several columns. To verify that data has
been entered correctly I have a column that adds all the columns and should
equal zero if they are entered correctly. Since the "proofing column" is not
always visable unless I tab to the end of the worksheet, I would like to hear
a beep if the column is greater than zero to signal that I need to check my
entries. It would be great if I could see a dialogue box that would tell me
my entries are not correct.

Thanks,
 
Hi,

You will need to use VBA to do that. It might be easier to conditionally
format cell A1 to turn red if the sum of the column is not 0.

The vba code to do what you want is

Private Sub Worksheet_Change(ByVal Target As Range)
If [G18] <> 0 Then Beep
End Sub

where G18 is the cell which should sum to 0

The conditional format would be done by selecting cell A1 or more cells and
choosing Format, Conditional Formatting, choose Formula is from the first
drop down, in the second box enter the formula

=$G$18<>0

then click Format and on the patterns tab choose Red.

You can actually select the entire spreadsheet and apply this conditional
formatting - that would make it very clear when there was a problem!

Thanks,
Shane Devenshire
 
Back
Top