How to Create Alerts in Excel – 4 Examples

This is an overview.

Alerts in Excel


Download Practice Workbook


Example 1 – Using the Conditional Formatting to Set Up Alerts When a Due Date Approaches

1.1 Setting Up Alerts

  • Select the cells you want to set an alert for.
  • Go to the Home tab. In Styles, click Conditional Formatting, and choose New Rule

Opening Conditional Formatting

  • In New Formatting Rule, select Use a formula to determine which cells to format.
  • Enter the formula below in Format values where this formula is true:.

=AND($D5>TODAY(),$D5-TODAY()<=7)

  • Click Format and select a color to highlight the cells due in 7 days.

Setting new formatting rule

Dates will be highlighted.

Formatting Added


1.2 Customizing Alerts

  • To customize the alerts, select the cells.
  • In Conditional Formatting, click Manage Rules.

Choose Managing Rules

  • In the Conditional Formatting Rules Manager,  choose Edit Rule.
Choosing edit rule

Click the image to see the full view

  • Customize the alert by changing the rules. Here, the formula will highlight dates due in 3 days. The color can be changed in Format.

=AND($D5>TODAY(),$D5-TODAY()<=3)

Applying New Rule to Edit formatting rule option

Delivery dates due in 3 days will be highlighted.

Output after Customizing Alerts


Example 2. Combining the IF, AND, and TODAY Functions to Get Alerts If the Due Date Approaches in Excel

IF function syntax

 

  • In an adjacent cell, enter the following formula.

=IF(AND(D5<>"",TODAY()+7>=D5),"Yes","")

  • Drag down the Fill Handle to see the output.

Combimimg IF,TODAY,& AND functions


Example 3 – Applying Data Validation to Create a Pop-Up Alert When a Cell Is Selected

  • Select a cell.
  • Go to the Data tab and in Data Tools, select Data Validation.

Selecting Data Validation tool

  • Click Input Message.
  • Enter a Title and Input the Message that will be displayed when you select the cell.
  • Click OK.

Input message from data validation

  • If you select the cell, the message will be displayed.

Showing message on selection


Example 4 – Creating a Notification for Decision Making by Embedding a VBA Macro

  • Right-click the sheet name and select View Code.

Opening VBA

  • Enter the following code.
Sub Reminder_date()
    Dim date_col As Range
    Dim due_date As Range
    Dim pop_up_reminders As String
    Set date_col = Range("D5:D11")
    For Each due_date In date_col
        If due_date <> "" And Date >= due_date - Range("C13") Then
            pop_up_reminders = pop_up_reminders & " " & due_date.Offset(0, -2).Value
        End If
    Next due_date
    If pop_up_reminders = "" Then
        MsgBox "Do not have any reminders for today."
    Else
        MsgBox "Contact these buyers: " & pop_up_reminders
    End If
End Sub

Code inserted

  • Press Alt+F8 and select Sheet5.Reminder_date macro.
  • Click Run.

Selecting macro

  •  Buyers that need to be contacted will be showcased in a message.

Alerts showing which buyers need to run that day


Frequently Asked Questions

1. How do I set a reminder alert in Excel?

Answer: Install an add-in: select Get Add-ins in the Insert tab, search for Reminder in the Store tab, select Accessibility Reminder, and choose Add. To accept the terms and privacy policy, click Continue. The Accessibility Reminder tab will be displayed on the ribbon.

2. How can I disable or modify existing alerts in Excel?

Answer: Change the conditional formatting rules or the VBA macros.

3. How do I add a warning text style in Excel?

Answer: Go to the Home tab, in Styles, click Cell Styles, and choose Warning Text.


Alerts in Excel: Knowledge Hub


<< Go Back to Learn Excel

Get FREE Advanced Excel Exercises with Solutions!

Tags:

Priti
Priti

Priti Halder holds a BSc degree in Naval Architecture and Marine Engineering from Bangladesh University of Engineering and Technology. She has been a part of the ExcelDemy project for 6 months and during this time, she has written over 30 articles and 5 comments for the platform. Priti is currently employed as an Excel and VBA content developer and provides effective solutions to various Excel-related issues. She is passionate about expanding her knowledge of data analysis and Microsoft... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo