SOLVED
Home

Conditionally Making a Sound

%3CLINGO-SUB%20id%3D%22lingo-sub-870893%22%20slang%3D%22en-US%22%3EConditionally%20Making%20a%20Sound%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-870893%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Excel%20friends%2C%20hope%20you%20can%20help%20me!%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20play%20a%20sound%20when%20a%20condition%20in%20a%20specific%20cell%20is%20met%20(cell%20value%20is%20higher%20than%20for%20example%2020)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20tried%20to%20use%20the%20VBA%20script%20on%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fexcelribbon.tips.net%2FT005834_Conditionally_Making_a_Sound.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fexcelribbon.tips.net%2FT005834_Conditionally_Making_a_Sound.html%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.extendoffice.com%2Fdocuments%2Fexcel%2F4417-excel-play-sound-if-condition-is-true.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.extendoffice.com%2Fdocuments%2Fexcel%2F4417-excel-play-sound-if-condition-is-true.html%3C%2FA%3E%3C%2FP%3E%3CP%3Ebut%20when%20I%20use%20the%20formula%26nbsp%3B%3CSTRONG%3E%3CSPAN%3E%3DIF(A1%26gt%3B300%2CBeepMe()%2C%22%22)%20%3C%2FSPAN%3E%3C%2FSTRONG%3EI%20get%20an%20error%20message%3A%20%22there%20is%20an%20errow%20in%20your%20formula.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20anyone%20know%20what%20the%20problem%20is%3F%20(I%20am%20using%20Office%20professional%20plus%202016%2032%20bit)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20you%20very%20much!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMartin%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-870893%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-871772%22%20slang%3D%22en-US%22%3ERe%3A%20Conditionally%20Making%20a%20Sound%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-871772%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F413823%22%20target%3D%22_blank%22%3E%40Excel1020%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENot%20sure%20what%20your%20issue%20is%20but%20have%20attached%20a%20sample%20file%20done%20with%20the%20instructions%20from%20the%20second%20link%20in%20your%20post%2C%20which%20works%20perfectly.%20The%20function%20is%20saved%20in%20module1.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERich99%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-872118%22%20slang%3D%22en-US%22%3ERe%3A%20Conditionally%20Making%20a%20Sound%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-872118%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F259521%22%20target%3D%22_blank%22%3E%40Rich99%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20so%20much%20Rich99%2C%20based%20on%20you%20spreadsheet%20I%20found%20where%20I%20went%20wrong!%3C%2FP%3E%3CP%3ERight%20is%3CBR%20%2F%3E%3DIF(C20%26gt%3B0%2C15%3BSoundMe())%3C%2FP%3E%3CP%3EInstead%20of%3CBR%20%2F%3E%3DIF(A1%26gt%3B300%2CSoundMe()%2C%22%22)%3C%2FP%3E%3CP%3EAnd%20I%20did%20not%20add%20a%20module%20to%20add%20the%20VBA%20script%20(I%20am%20a%20newbee%20to%20VBA)%3C%2FP%3E%3C%2FLINGO-BODY%3E
Excel1020
New Contributor

Hi Excel friends, hope you can help me! 

 

I am trying to play a sound when a condition in a specific cell is met (cell value is higher than for example 20)

 

I have tried to use the VBA script on https://excelribbon.tips.net/T005834_Conditionally_Making_a_Sound.html

https://www.extendoffice.com/documents/excel/4417-excel-play-sound-if-condition-is-true.html

but when I use the formula =IF(A1>300,BeepMe(),"") I get an error message: "there is an errow in your formula.

 

Does anyone know what the problem is? (I am using Office professional plus 2016 32 bit)

 

Thanks you very much!

 

Martin

2 Replies
Solution

Hi @Excel1020 

 

Not sure what your issue is but have attached a sample file done with the instructions from the second link in your post, which works perfectly. The function is saved in module1.

 

Regards

 

Rich99

@Rich99 

 

Thank you so much Rich99, based on you spreadsheet I found where I went wrong!

Right is
=IF(C20>0,15;SoundMe())

Instead of
=IF(A1>300,SoundMe(),"")

And I did not add a module to add the VBA script (I am a newbee to VBA)

Related Conversations
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Edge insider Dev bypasses IE mode website list
HotCakeX in Enterprise on
4 Replies