Microsoft Excel is primarily used for data management and analysis. The functionalities that this MS Office tool offers are often baffling, given how much it packs in just one software. Another feature, that many may not be aware of, is that using Excel’s VBA you can even create the sound of an alarm in Excel. Today, we will look at how you can create and ring an alarm in Excel.
How to create an alarm in Excel
It may sound abstract and useless initially, but having a visual cue work every time a condition is met in Excel can be immensely useful. For example, if the cell moves to another sheet or is a bit off the edge, an alarm alert would instantly notify you of what has gone wrong. We will be using Visual Basic for this tutorial but ensure that the steps are as streamlined and easily explained as possible.
- Open Microsoft Excel and click on the Developer tab. If you don’t have the Developer option on your options ribbon, you can add it by clicking on File > Options > Customize Ribbon > select Developer
- You’ll then see a Visual Basic Option under the Developer tab. Clicking on it will open the VBA window separately
- Go to Insert > Module and paste the following block of code there
Function MakeABeep() as String Beep MakeABeep = “” End Function
- Click on the Save icon and in the subsequent dialog box, ensure that you save it as an Excel Macro-Enabled Workbook. Also, ensure that you maintain the indentation in this block of code
- Now, close the Microsoft Visual Basic for Applications window
You can then easily test if this alarm is working or not. In an empty cell, type =MakeABeep() and press enter.
How to trigger an alarm in Excel?
Simply creating an alarm will be of little or no use to you. Your alarm prompt must trigger every time a mistake is made and you can make it work that way by setting it to ring every time a condition is met. Suppose you want the alarm to get triggered every time a cell reaches or exceeds a certain value. Here’s what you need to do in order to set such a triggering condition for an alarm in Excel.
- Open Excel and in a blank cell, type ‘=IF(’
- If you don’t want the value of a cell to increase by 100, follow it as: ‘IF(B1>50, MakeABeep()’
- The third parameter is the action that would take place if the condition is false. Since we don’t want anything to happen to that, we leave it blank.
Your final command line should look like:
=IF(B1>50, MakeABeep(), “”)
Press Enter and if the cell B1 has a value that exceeds 50, you’ll hear the alarm sound.
We hope that you will now be able to set alarms in Excel with ease.
How do I create an expiry notification in Excel?
An expiry notification or indication on Excel generally pertains to dates. Herein, dates that have expired or are close to the date of expiration may be highlighted, and you can do so using the conditional formatting option in Excel. Click on Home > Conditional Formatting > Manage Rules > New Rule. Here, select ‘Format only cells that contain’, ‘Less than’ from the second drop-down and enter the following formula:
=NOW()+30
Save this and you’ll notice all the expired dates having been highlighted.
Can Excel send an email alert automatically?
Another unpopular Excel feature is its ability to send email alerts automatically. For those of you who didn’t know, Email Reminders can be set in Excel using Power Automate, and this process doesn’t even require you to have any prior programming knowledge.