How do i send pop up notification in excel when item quantity reaches minimum threshold

LAKE, Joe (ISLAND CITY PRACTICE) 25 Reputation points
2024-01-30T09:01:36.83+00:00

How do i send pop up notification in excel when item quantity reaches minimum threshold

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Emi Zhang-MSFT 30,046 Reputation points Microsoft External Staff
    2024-01-31T03:14:22.3066667+00:00

    Hi,

    You can try to use the Data Validation to get the result you need.

    Select the Range you need- go to Data- Data Validation- Settings tab- Select Whole number and enter the Minimum number and the Maximum number:

    User's image

    Select Error Alert tab- enter the Title and Error message you need to pop up:

    User's image

    The Result will showing:

    User's image

    Just checking in to see if the information was helpful. Please let us know if you would like further assistance.


    If the response is helpful, please click "Accept Answer" and upvote it. Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Tanay Prasad 2,250 Reputation points
    2024-02-01T08:43:19.32+00:00

    Hi,

    You can use a combination of VBA code and Excel events.

    Here's a basic example-

    1. open your VBA Editor.
    2. Insert a New Module.
    3. Paste this code-
    Private Sub Worksheet_Change(ByVal Target As Range)
        Dim threshold As Integer
        
        ' Set your minimum quantity threshold
        threshold = 10 ' Adjust this value as needed
    
        ' Check if the changed cell is in the quantity column (assume it's column B)
        If Not Intersect(Target, Me.Columns("B")) Is Nothing Then
            ' Check if the new quantity is below the threshold
            If Target.Value <= threshold Then
                ' Display a pop-up notification
                MsgBox "Item quantity is below the minimum threshold!", vbExclamation, "Low Quantity Alert"
            End If
        End If
    End Sub
    
    

    Adjust the threshold value as per your need.

    Then Close the VBA Editor and save your Excel file as an .xlsm.

    Regards,

    Tanay

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.