I have amended some of the code provided by an expert to alert when a certain value is reached in a cell, basically its:
For Each xCell In Range("O2:O" & xLastRow)
xValue = xCell.Value
If Not IsError(xValue) Then
If xValue <> "" And xValue = 0.0002 Then
PlayTheSound "Windows XP Print complete.wav"
Cells(1, 15).Interior.Color = 255
Point02 = True
I would like a sound when xValue = 0.0002 (0.02%)
Originally it was < 0.0002
However, I think because I'm after an exact number its not alerting. So my guess is I think it needs to be rounded.
I have attached the spreadsheet to illustrate. The cells in question are in column O
I should mention that I have conditionally formatted the column to highlight when the value goes below < 0.0002. But as I mentioned, I would just like a sound alert when the actual value is reached.
The sound has been taken care of by Chris (another expert). I now just need it to be activated when 0.0002 is actually reached.
I hope my explanation isn't to convoluted.