Blog reader Richard asks through email:
I’m a non-programing user of Excel. I import stock prices, using what is called ( I believe) a dde link, into my spreadsheets,from a trading program.
I would like to add a feature to my spreadsheets that, like conditional formatting, alerts me to a price change in a cell, but with a sound or .wav file, instead of a color change of that cell.
Something like: =if b4 =>10.00, play .wav
Is there something you can help me with? I am using office 2003 pro.
You can write a vba macro that can create a windows media control (active-x) component and use it to play a .wav (or mp3) file when a certain event happens. But it would be both time consuming and difficult to implement.
The simple solution is of course “beep” whenever a certain condition is met, in this case, the stock price getting changed.
Thankfully, we have a vba command to do just the job, Beep, will play a standard windows beep sound when called. So all you have to do is, create a user defined function shown below:
Function beepNow()
Beep
End Function
And use it in your excel sheet like: =IF(C2<>C3,beepNow(),""). So when the data gets dynamically refreshed, you would hear a ding if C2 is not equal to C3.
What would use beepNow() for?













One Response to “How to compare two Excel sheets using VLOOKUP? [FREE Template]”
Maybe I missed it, but this method doesn't include data from James that isn't contained in Sara's data.
I added a new sheet, and named the ranges for Sara and James.
Maybe something like:
B2: =SORT(UNIQUE(VSTACK(SaraCust, JamesCust)))
C2: =XLOOKUP(B2#,SaraCust,SaraPaid,"Missing")
D2: =XLOOKUP(B2#,JamesCust, JamesPaid,"Missing")
E2: =IF(ISERROR(C2#+D2#),"Missing",IF(C2#=D2#,"Yes","No"))
Then we can still do similar conditional formatting. But this will pull in data missing from Sara's sheet as well.