Discover the Anyleads suite | Find emails, verify emails, install a chatbot, grow your business and more!.
blog

Can Excel send me an email alert automatically?



Can Excel send me an email alert automatically?


Excel can help you automate the boring parts of your job so that you spend less time on repetitive tasks—and more time doing what’s important. We show you how to use Excel for automated reminders or even sending out emails from within Microsoft Office itself.

Automated Outlook Reminders (macros) are great but often require some programming expertise (or at least familiarity). If you want something simpler, here’s how to make sure that Excel does most of the heavy lifting instead.

How do I set up an automatic alert in Excel?

Before we get started, let’s talk about exactly what kind of alerts you want to set up. The way you configure these rules will depend on which type of alerts you want to receive. You should also consider whether you need to be notified by text message, phone call, or email for each event. Some events may require only one notification while others may warrant multiple notifications. It all depends on the nature of the task and how much information needs to go along with it.

For our purposes today, however, we just need to know where to find them once they’re configured. So let’s say you wanted to track overdue projects using Excel. To do this, you would first select any project cell range via Ctrl+click, right-click, then choose Data Tools " Design Controls... In the window that appears, click Create Control under Categories & Choose Commands. This creates new controls called “Due Date Alert 1" and “Due Date Alert 2". Double-click either control to open its properties dialog box. Here you can change the title, label, icon, etc. as well as adjust other settings like when the control activates and deactivates. Click OK when finished. Repeat the process above for creating additional due date alarms.

You can now drag those controls onto any spreadsheet cells containing dates associated with your specific projects. When you drop them there, they become active, meaning whenever that particular cell changes, the alarm triggers. As long as the value in the cell goes past the specified threshold, the corresponding alert runs. Let’s say we had two overdue projects, Project A and Project B. We could place both Due Date Alert 1 and Due Date Alert 2 next to their respective cells in order to trigger different types of alerts based on the data entered into those cells.

If you prefer to skip the entire design step outlined above, you can still create an alarm without having to manually code its functionality. Just double-click any of the existing controls to launch their Properties Window. Under Events, check off OnChange and/or OnEnter depending on your preference. Once done, simply drag that control over any empty cells in your spreadsheet until it becomes active. Now whenever those cells change, the control fires off whatever action you programmed it to.

Can Excel generate alerts?

Yes! But before getting too excited, keep in mind that not every alert method works equally across platforms. Depending on what OS you run Windows 10 Home Edition Professional 64 bit | 32bit| Enterprise | Education | Server 2016 | 2019 | Pro 7 | 8 | 8.1 | 9.

So let’s assume you only care about setting up automated alerts through Windows. First things first, you must enable the Developer tab via File " Options " Customize Ribbon. Then head back down to Developer Tab " Formulas " Manage Event Sets.... Click New Set to add a new group to monitor certain conditions. Give your group a descriptive name such as Overdue Projects. Next, switch over to the Triggers tab. From here, you can begin adding various actions that will activate upon detecting certain criteria. For instance, let’s say you want to log overdue projects immediately. Add the following criterion: =IF(A2>$F$4,"True","False") That means anytime Cell A2 exceeds $F$, the condition will evaluate to True. Then select the Action Dropdown menu and choose Email Me. Type in your own personal address in the Send To field, enter Subject line, and optionally include Message content if needed. Finally, hit Save Trigger Settings and Close Group. At this point, Excel has created your first custom alert. Feel free to repeat the same steps for additional groups related to other criteria.



How do I create a due date alert in Excel?

Now that we’ve covered basic alerts, let’s move on to actually creating a due date alert ourselves. We mentioned earlier how easy it was to create an alert when changing a single cell. However, the problem arises when trying to change many cells simultaneously. Thankfully, the solution lies in VBA scripting. Before proceeding further, ensure you’re familiar with Visual Basic for Applications (VBA), especially Macro functions.

To create a macro function that detects when a given cell changes, follow these quick instructions:

Select the target cell whose value you wish to detect. Press Alt + F11 to bring up the VB Editor. Paste the following script below Module1 Sub Test_Cell() Dim wb As WorkbookDim sht As WorksheetDim cel As RangeWith Application("WatchDog").DisplayAlerts = False With Sheets("Sheet1").EnableEvents = True End With 'Set reference variables' With.Controls _Get.Item("cellname").ValueEnd With End With 'Disable Watchdog alert'.DisplayAlerts = TrueEnd Sub Exit Sub

Next, save the file somewhere accessible to you. Also note that the path to this file won't appear in Word unless you specify otherwise. Now press Alt + Q to bring up Quick Assist. Select References from the left sidebar, scroll down, and choose Microsoft Scripting Runtime Library. Check Show Messages Boxes and Finish Selection. Hit Ok and close the editor. Then, return to the normal screen and try running the newly added function. Whenever you modify the target cell, Excel will display a pop-up saying Change detected.

This technique can be applied to numerous situations beyond simple cell modification. Take advantage of it to perform complex calculations, loop through arrays, and more.

How do I send an automatic email reminder in Excel?

We’ll conclude our discussion by showing you how to build a fully functional system that sends yourself daily emails reminding you of upcoming deadlines. Follow these steps:

Open a blank document in Excel. Head to Insert " Text Box. Right-click inside the box and choose Format Object. Make sure AutoFilter Is Off and Clear Contents ticked. Enter your desired email subject and body text in the appropriate fields, respectively. Lastly, select Multiple Lines option.

Click outside of the text area to exit editing mode. Go ahead and insert another row beneath the ones already present. Again, right-click inside the box and choose Format Object. Toggle AutoFilter On and untick Clear Contents. Enter the proper formatting details for Cell A1 including the recipient’s name, company info, and contact number. Select All Cells from Row Source and uncheck Restrict Editing to Contents Only. Place a colon between your text and Cell A1, followed by space characters, then paste the formula shown below. Leave everything else alone except the Formula bar field. Replace "$D$3" with whichever column contains the applicable deadline.

In the Formula bar, locate the Address Field button located below Name Label. Drag it over to the last available spot. Then, highlight the text after Address and change it to Sheet1![Header].[Name].

Finally, drag the Mail Merge Button over to the final remaining slot. Since you chose to embed formulas rather than values, clicking this button will launch MS Word and prompt you to populate columns D to Z with names and addresses.

When ready, hit Run and watch as Excel auto-populates the correct recipients, bodies, and dates. Notice that this approach requires a little extra effort since you’d likely need to update the mail merge periodically. But considering the results, I think it’s worth putting in the extra legwork necessary to achieve higher accuracy. And if you ever decide to stop working on it altogether, just delete the rows containing the mailing data. Easy peasy.

The ease of automation doesn’t end here. There are countless ways you can take advantage of Excel’s built-in tools to streamline the mundane aspects of life. Perhaps you'd like to learn more about macros, VLOOKUP, INDEX, HLOOKUP, XLOOKUP, DAX, Pivot Tables, Power Query, Power Pivot, Lookup Values, Sorting, Filtering, Conditional Formatting, etc.? Or maybe you're interested in learning how to integrate Google Calendar with Excel to stay organized? Regardless of what you desire, there's always room for improvement. Whether you want to start fresh with Excel 2013 or upgrade to Excel 2020, you'll discover tons of helpful resources on our website.

And remember, Excel isn't meant to replace human intelligence — it's supposed to augment it.

Excel has some pretty cool uses for automation—it can create reports or charts, run macros on data that changes over time, even take photos of documents as PDFs—but what about sending yourself automated notifications?  Here’s how to set up your own system for doing just that.

As the title asks, can Excel send me an email alert automatically? Yes! And no more waiting around for those annoying reminders popping up at 2 AM telling you there’s something new to see on YouTube. Let’s get started by looking into all three ways this could be done.

The easiest way would involve using Microsoft Word itself as the sender (or receiver) of the notification. This method will allow you to easily customize the message and include images and links within the body of the email. It also allows you to attach files like spreadsheets, which are much easier than trying to link them through email attachments. If you want users who don't use Office 2010 to still read these messages, try setting up a custom HTML signature. The code below was written specifically for Windows 7 64-bit but should work fine on any version of Windows including XP 32 bit.

Note that while this works well for simple one-time events like “due dates”, it isn’t very good for recurring tasks because of its lack of support for event handlers. Also, since this relies on Word, it only supports outgoing mail so receiving alerts won’t work unless you forward your email account to another service.

If you wanted to make this process slightly less complicated, you might consider creating an addin instead of coding directly into the application. You could then distribute copies of this addon to other people without worrying about their security settings. Just follow along as we walk you through adding functionality to Word 2007. Note that you may need admin privileges on your computer depending on whether you’re running 2003 or 2007. Once you've got everything working properly, open up wordpad.exe (not word.exe), go to File -" Options -" Addins, select COM Server Settings under "COM Add-Ins", click Browse..., find your.dll file and double-click it. Finally, head back to File -" Options -" Addins again and check off Run before each Use box. Now whenever someone opens a document containing embedded content from your addin, Word should load your code and execute whatever commands you specify. Here’s how to write a basic Hello World function to test out this idea :

Now let’s actually embed our logic inside of an actual addin. First things first, we’ll need to download a couple different libraries that handle activation scripts and DLL loading respectively. Head over to Google Code and grab the Activation Library [Broken URL Removed] and Activator 1.6 DLL Files. After downloading both, extract the zipped contents of the zip archive and put them somewhere safe. We’ll refer to them later.

Next, head over to Visual Basic Editor —> Tools menu item. Click References and scroll down until you spot the reference called Shell. Double-click it and look at the properties window. Make sure ActiveX is checked. Next, right click anywhere blank in the editor pane and choose View -" Toolbar Items -" Insert. Under Controls dropdown, choose CommandButton1. Then rename it MyCommandButton. Right click on this button and choose Properties. In the dialog box that pops up, change the Caption property to LaunchMe. Hit OK and close the editor. Go ahead and save your project now that you’ve created your command button.

Finally, copy/paste the following script into the VB editor and name the file Main.vb. When complete, compile your project.

When you're ready, move onto step two. Open up a plain text (.txt) file and paste the following lines into it:

Sub Auto_Launch()Dim oShell Dim sPath Dim fso Dim wshShell Dim strText

strText = """"[SCRIPT NAME HERE]""]" & Chr(34) & _

"[TITLE OF SCRIPT HERE]" & Chr(34)"[/TITLE]" & Chr(34) & _

Chr("Hello" & Application.UserName & Chr(34)) & Chr(34)"[/Script]" & Chr(34) & _

Chr("body here") & Chr(34) & Chr(34)End SubSave this file as cmdline.bat. To launch this batch file manually, type cmd.exe /c start c:\path\cmdline.bat. This launches the same window as if you had typed the entire line above into Notepad. Cool, eh? Now, replace the words "[SCRIPT NAME HERE]" with your actual filename, and insert the path where you stored your compiled dll and vbs files. Replace the rest of the variables with your own user information. Save this modified bat file wherever you’d like. That’s it! Your auto-launch routine is now fully functional. Now, every time you open Word with a preloaded VBS file, your main subroutine will fire off immediately. Whenever anyone else tries opening it, nothing happens. That’s because we haven’t told it yet to store anything useful inside of the variable named oShell. Change the last few lines of your code accordingly :

sub Auto_Launch() dim shell oshell=wscript.createObject("WSHOleLibrary").GetCurrentDirectory() + "\VBSFiles\"+Application.UserName+".wsf" 'Load WSF file into memory' set objShell = CreateObject ("WScript.Shell") Set oFSO = GetFolderFromID ((Word.Document.Sections("Contents").Headers("Footer').PageSetup.Fields("Footnote").Value),",") oFSO.CopyFile "C:\Users\Public\Documents\My Documents\myfile.docx", "c:\temp\

ewfile.docx" end sub

This creates a folder in My Documents named after the current User ID and loads the associated WSF file into memory. The next part simply looks through the directory listing for a file matching the extension of the currently active doc. If found, it takes the full pathname of the file and uses FSO functions to cut away everything except the file name. Finally, it sends the newly renamed file to a temporary location. This means you’ll probably receive errors upon attempting to open it, but that’s okay. All you really need is a new file.

After saving this file, point Word back to your original.WSF file. Now that you’ve added this feature, you’ll never have to remember to schedule updates anymore. Instead, you'll always be able to update your documents via scheduled task. Just set the trigger to Start a Program and browse to your Bat file. Don’t forget to set Upstart once you’ve made the necessary edits!

Do you think this sounds too hard? Try taking this approach and adapting it to integrate Excel sheets rather than Word docs. What kind of automations are you interested in seeing built into applications like Excel and Word? Share your thoughts and ideas with us in the comments!

You want your spreadsheet or Word document to remind you of something—like when a bill’s up next, or when the rent checks are supposed to clear.  But what if there was another way for that information to pop into your consciousness? What if you could get a notification via email every time a particular condition happened in your spreadsheets?

It turns out, yes! You can use Office 365 services like Outlook on the web and OneDrive (formerly known as SkyDrive) to create this kind of functionality in Excel. Here we show how.



How do I automate a reminder in Excel?

First things first, let’s start by creating our automated function. We’ll be using VBA code here, but any other programming language will also work fine. The process should look similar across programs. First, head over to Tools " References in the Ribbon menu. Then select Microsoft Scripting Runtime. This allows us to call functions from within our scripts.

Once everything has loaded properly, open up whatever file you want where you would normally enter formulas, charts, and data. It doesn't matter if it’s a.xlsx,.xlsm, or plain ol'.xls file because all three formats support scripting just fine. Make sure you're looking at Data tab | Sheet1 though, since we need to reference that sheet later.

Now, right click anywhere inside the script editor pane and choose Insert -" Module. A new window pops up. In the module name box, type AutoReminderEmailer. Hit Enter and then Save As so that you can give it a more descriptive title. Now save again.

Your script might not appear immediately after hitting “Save As,” depending on which program you’re using. If yours does take some time to load, don’t worry. Simply go back into the same folder where you saved the newly-named script and double-click on it. Any changes made will now reflect directly onto your original script.

Next, we need to add a little bit of logic to tell the computer exactly what we want Excel to do. Right below the line saying Set objExcel = CreateObject("excelfile"), insert the following lines of text: Sub SendMail() Dim myString As String Dim iRowCount As Integer Dim strbody As String 'Set row count Dim xldata Sheets(0).Select Range("A2").Value = CInt((iRowCount + 2)/3) iRowCount = 0 While iRowCount "" 3 End While Dim oOutlook As Object Set outlookapp = GetObject ("outlook.application") Set mailitem = outlookapp.CreateItem(0) With mailitem Do Until IsEmpty (strBody): strBody= vbNullString : Loop On Error Resume Next With mailitem.To = "youremail@gmail.com" _ AndAlso mailitem.CC = "" OrElse mailitem.BCC="" mailitem.Subject = "Test Subject" Call AddAttachmentfileName strFilePath, False, mailitem.Display(False) mailitem.Attachments.Add strFileName, mimeTypeOfStrFile, True, """" pathnameForMemo & strFileName """" End With With Application.Wait DateTime::Now + TimeValue('00:01:30'), {Hourly Interval} ElseIf HourIsBetween 8 And 16 Then MsgBox "No Reminders Today", 64: Exit Sub End If Else If MinuteIsGreaterThanOrEqualTo 10 Then Msgbox "There Are No Calibration Devices Available To Process Today.", 32 End If Else If DayNumber(Date()) Between 1 And 4 Then Msgbox "All Calibration Devices Have Been Scheduled For Tomorrow." Else: Msgbox "No Calibration Devices Available To Schedule,"/ msgbox end sub

The most important thing to note about this piece of code above is that while we’ve given it a very general description, we haven’t actually told the program much yet. There may be multiple conditions that trigger different actions. Let’s break down each part of the statement one at a time.

Sub SendMail()

This tells Excel that whenever anything happens under these circumstances, run this section of code:

Dim myString As String

myString = InputBox("Enter Message Here")

Do Until IsEmpty (strBody)

We'll set aside the inputting of actual message for now. But the Do...Until loop lets us keep running through until an empty body field is entered. That means no one gets notified unless someone fills out their own email address and enters characters manually.

While iRowCount "" 3

Here, we've specified that we only want to continue executing once iRowCount becomes less than or equal to 3. Otherwise, the rest of the statements between elseif and else won't execute. So, even if there are two rows left blank, the loop wouldn't repeat itself twice.

iRowcount = 0

Finally, we begin setting variables necessary for our emails. These include the number of rows remaining before sending the email, as well as the range of cells that contain the bodies of our messages.

On Error Resume Next

With excel application object already opened.

In order to accomplish this task, we need to temporarily suspend error checking. Without doing this, errors will stop our entire script from completing successfully.

Call AddAttachmentfileName

pathnameForMemo & strFileName

& pathnameForMemo being the location we created earlier where we stored the memoized version of the attachment files names. Finally, adding the last portion of our path gives us the full local file path.

End With

Application.Wait DateTime::Now + TimeValue('00:01:30')

Using the Wait command makes it wait for a certain amount of seconds rather than instantly returning control to the user interface.

Then, we check whether anyone filled out any entries during those few minutes.

else if HourIsBetween 8 And 16 Then

If hour falls between morning hours (8am to 9am), noon hours (9am to 12pm), afternoon hours (12pm to 5pm), or evening hours (5pm to 6pm), then…

MsgBox "No Reminders Today", 64: Exit Sub

Exit subs basically exit out of the current block of code. In our case, if anyone entered any values in the hours fields, nothing further would happen.

Otherwise, if the hour isn’t mentioned above, proceed to the next section of code.

end if

After ending our IF statement, we close off our previous ones using closing brackets.

End If

If the user didn’t fill out any value in either of these sections, the next step is to determine whether minute is greater than ten. This is accomplished with an ELSEIF statement.

else if

As long as minute is not greater than ten, carry on with the rest of our statement.

End If

This is pretty straightforward. If the minute column contains numbers less than or equal to ten, then write them to our memoized array.

End If

Lastly, we check whether daynumber is equal to four. If it is, then…

MsgBox "All Calibration Devices Have Been Scheduled For Tomorrow."

exit sub

Execute this line if daynumber is equal to four.

End If

Again, if daynumberequals four, we simply display a message to the user letting them know that all calibration devices were scheduled for tomorrow instead of today.

End If

Finally, we wrap up our main Subroutine with an END SUB statement.

End Sub

Now, hit F5 to test your macro. Your system will ask you if you wish to schedule an appointment with the Macro Wizard – say Yes to both prompts. After clicking OK, Excel will prompt you to assign a shortcut key to your macro. Choose whatever combination works best for you.

When scheduling appointments in Excel, users who want to view their schedules often prefer to see dates and times in 24-hour notation. Also, people working with clients might find it easier to refer to days of the week rather than numerical months. Regardless, Excel offers several ways to format dates.

How do I send an automatic email reminder?

So far, we’ve figured out how to allow Excel to notify ourselves when events occur. However, sometimes we may still want to receive notifications without having to log into a special account. Maybe we’d like additional features like changing the subject of the email, attaching images, etc. Luckily, Microsoft provides free tools called SharePoint Designer 2010 and Visual Studio 2013 Community Edition to help us achieve this goal.

SharePoint Designer 2010 helps us design forms to interact with various components of Sharepoint. Though designed primarily for business applications, SharePoint Designer 2010 also includes templates specifically intended for automations. Using this tool, we can modify the behavior of macros, event receivers, form controls, and other objects.


Author

Anyleads

San Francisco

We are the leading marketing automation platform serving more than 100,000 businesses daily. We operate in 3 countries, based in San Francisco, New York, Paris & London.

Join Anyleads to generate leads

Error! Impossible to register please verify the fields or the account already exists.. Error, domain not allowed. Error, use a business email. Welcome to the Anyleads experience!
More than +200 features to generate leads
Register to start generating leads

Create your account and start your 7 day free trial!

Error! Impossible to register please verify the fields or the account already exists.. Error, domain not allowed. Error, use a business email. Welcome to the Anyleads experience! By registering you agree to the Terms and conditions agreement.
More than +200 features to generate leads

We offer multiple products for your lead generation, discover them below!

>> Unlimited access to all products with one single licensecheck our pricing.