Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8162645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:47:02+00:00 2026-06-06T18:47:02+00:00

I am using VBA to check a value of a cell and call an

  • 0

I am using VBA to check a value of a cell and call an email module to email if the cell’s value is more than a value.

I want to check multiple cells but understand that it is not possible to have two Private Sub Worksheet_Change in VBA. What is the best way to check multiple cells?

Here is the code I am using;

Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Cells.Count > 1 Then Exit Sub
    If Not Application.Intersect(Range("A1"), Target) Is Nothing Then
        If IsNumeric(Target.Value) And Target.Value > 10 Then
        Call Mail_small_Text_Outlook
        End If
    End If
End Sub

Here is another if possible I would like to combine into the one Sub

Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Cells.Count > 1 Then Exit Sub
    If Not Application.Intersect(Range("B1"), Target) Is Nothing Then
        If IsNumeric(Target.Value) And Target.Value > 20 Then
        Call Mail_small_Text_Outlook
        End If
    End If
End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T18:47:05+00:00Added an answer on June 6, 2026 at 6:47 pm

    How about doing this?

    Private Sub Worksheet_Change(ByVal Target As Range)
        Call MailAlert(Target, "A1", 10)
        Call MailAlert(Target, "B1", 20)
    End Sub
    
    Private Sub MailAlert(ByVal Target As Range, ByVal Address As String, ByVal Value As Integer)
        If Target.Cells.Count > 1 Then Exit Sub
        If Not Application.Intersect(Range(Address), Target) Is Nothing Then
            If IsNumeric(Target.Value) And Target.Value > Value Then
            Call Mail_small_Text_Outlook
            End If
        End If
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I m trying to select rows/columns using vba. I want to pass row numbers
I'm trying to loop through a set of cells using VBA in a worksheet
Using VBA I want to send a copy of the current word document to
I'm using VBA excel 2003,SQL 2005 to make a sql query call and inside
I'm using VBA to parse the soap xml with MSXML2 and XPath but while
Using VBA, can I find out the value of a text (combobox) control on
How to import multiple vCard VCF contact files into Outlook 2007 using VBA
I am using VBA to paste charts/graphs from Access to PowerPoint. Once pasted, I
I'm trying to access a query using VBA code. I think I've done it
Does anyone know how to clear the immediate window using VBA? While I can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.