Hi, I'm trying to get auto emails sent when certain cells fall below a certain value. For example Column G is current stock and column J is minimum stock. I want to send an email when G3 falls below J3 and same for when G4 falls below J4 and so on. I've tried the code below but is sending an email even when G3 is changed and doesn't fall below J3. Please help!
Dim xRg As Range
'Update by Extendoffice 2018/3/7
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Target.Cells.Count > 1 Then Exit Sub
Set xRg = Intersect(Range("G2:G500"), Target)
If xRg Is Nothing Then Exit Sub
If IsNumeric(Target.Value) And Target.Value < Range("J2:J500") Then
Call Mail_small_Text_Outlook
End If
End Sub
Dim xRg As Range
'Update by Extendoffice 2018/3/7
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Target.Cells.Count > 1 Then Exit Sub
Set xRg = Intersect(Range("G2:G500"), Target)
If xRg Is Nothing Then Exit Sub
If IsNumeric(Target.Value) And Target.Value < Range("J2:J500") Then
Call Mail_small_Text_Outlook
End If
End Sub