Play Sound if value of Cell I9 INCREASES

surkdidat

Well-known Member
Joined
Oct 1, 2011
Messages
582
Office Version
  1. 365
Is there anyway I can make Excel play an Alert sound of some sort every time the value of Cell i( INCREASES? (Not if decreases) please?
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
How is the value in Cell I9 updated?
Is it done manually (hard-coded)?
If it is a formula, please post the formula.
 
Upvote 0
How is the value in Cell I9 updated?
Is it done manually (hard-coded)?
If it is a formula, please post the formula.
It contains a COUNTIFS Formula, which is linked to another sheet. (
Excel Formula:
So =COUNTIFS('[Tracker.xlsm]In Progress'!$J:$J,H9)
How is the value in Cell I9 updated?
Is it done manually (hard-coded)?
If it is a
 
Upvote 0
What I would store the most recent value in I9 in some unused cell.
Then every time a calculation is run on that sheet, compare the current value in cell I9 to the previous value (in our stored cell), and "beep" if it has increasted.

In order to do that, right-click on the Sheet tab name at the bottom of the screen, select "View Code", and paste this code in the VB Editor window that pops-up:
VBA Code:
Private Sub Worksheet_Calculate()
'   Check to see if value in I9 increased
    If Range("I9") > Range("Z9") Then Beep
'   Store last value in Z9
    Range("Z9") = Range("I9")
End Sub

Note that I am using cell "Z9" to store the previous value of "I9". You can change that to any cell that you want.
Also note that this will "Beep" the first time you use it, as there is no value in the stored cell to start.
 
Upvote 0
What I would store the most recent value in I9 in some unused cell.
Then every time a calculation is run on that sheet, compare the current value in cell I9 to the previous value (in our stored cell), and "beep" if it has increasted.

In order to do that, right-click on the Sheet tab name at the bottom of the screen, select "View Code", and paste this code in the VB Editor window that pops-up:
VBA Code:
Private Sub Worksheet_Calculate()
'   Check to see if value in I9 increased
    If Range("I9") > Range("Z9") Then Beep
'   Store last value in Z9
    Range("Z9") = Range("I9")
End Sub

Note that I am using cell "Z9" to store the previous value of "I9". You can change that to any cell that you want.
Also note that this will "Beep" the first time you use it, as there is no value in the stored cell to start.
Thank you for this - is there any other sounds it can do the the standard "Beep" so I can differentiate it from when it just normally makes that sound? :)
 
Upvote 0
You can also use the Speech tool:

VBA Code:
Application.Speech.Speak "it increased"
 
Upvote 0
I am getting an error Message when it runs "28 - Out Of Stack Space" ?

Can you help? :)
 
Upvote 0
Try this variation:
VBA Code:
Private Sub Worksheet_Calculate()
'   Check to see if value in I9 increased
    If Range("I9") > Range("Z9") Then Application.Speech.Speak "it increased"
'   Store last value in Z9
    Application.EnableEvents = False
    Range("Z9").Value = Range("I9").Value
    Application.EnableEvents = True
End Sub
 
Upvote 0
Solution
Try this variation:
VBA Code:
Private Sub Worksheet_Calculate()
'   Check to see if value in I9 increased
    If Range("I9") > Range("Z9") Then Application.Speech.Speak "it increased"
'   Store last value in Z9
    Application.EnableEvents = False
    Range("Z9").Value = Range("I9").Value
    Application.EnableEvents = True
End Sub
Superb - this coding seems to be holding up :)
 
Upvote 0

Forum statistics

Threads
1,215,032
Messages
6,122,772
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top