value clusters with alert

vilem.iv

New member
Joined
Dec 30, 2020
Messages
3
Reaction score
0
Points
0
Excel Version(s)
2019
Hello,

i have automatically refresh pivot table when source table changes, but i am looking only for clusters of values in a row - green rounded below - image attached - I would like to "manage" Excel to create sound/email alert, when the defined value clusters apper. Has anyone knowlidge how to make it possible please?
 

Attachments

  • excl idea.jpg
    excl idea.jpg
    108.4 KB · Views: 13
The following, paste into the Sheet Module, will play the TADA sound when any change is made to the sheet :

Code:
Option Explicit


Private Declare Function PlaySoundA& Lib "winmm.dll" (ByVal lpszName$, ByVal hModule&, ByVal dwFlags&)


Private Sub Worksheet_Change(ByVal Target As Range)
    'If Not Intersect([L3:L24], Target) Is Nothing Then         '<--- For specific cell/s uncomment and specify the cell/s range
        PlaySoundA "C:\windows\media\tada.wav", 0&, &H20001
    'End If
End Sub


This is a basic email macro :

Code:
Option Explicit

Sub EmailSnd()
    With CreateObject("outlook.application").CreateItem(0)
        .to = "email address of recipient"
        .Subject = "test"
        .CC = "cc"
        .BCC = "bcc"
        .Body = "Hello ya all"
        .Send
    End With
End Sub
 
The following, paste into the Sheet Module, will play the TADA sound when any change is made to the sheet :

Code:
Option Explicit


Private Declare Function PlaySoundA& Lib "winmm.dll" (ByVal lpszName$, ByVal hModule&, ByVal dwFlags&)


Private Sub Worksheet_Change(ByVal Target As Range)
    'If Not Intersect([L3:L24], Target) Is Nothing Then         '<--- For specific cell/s uncomment and specify the cell/s range
        PlaySoundA "C:\windows\media\tada.wav", 0&, &H20001
    'End If
End Sub


This is a basic email macro :

Code:
Option Explicit

Sub EmailSnd()
    With CreateObject("outlook.application").CreateItem(0)
        .to = "email address of recipient"
        .Subject = "test"
        .CC = "cc"
        .BCC = "bcc"
        .Body = "Hello ya all"
        .Send
    End With
End Sub


Thank You Logit for your effort,

anyway the main purpose is: to generate these alerts when the cluster of values in the row apper - then trigger alert (check the image in original post please); The table is growing with time (column) so the table goes wider during updates. What do You think please?
 
.
'If Not Intersect([L3:L24], Target) Is Nothing Then '<--- For specific cell/s uncomment and specify the cell/s range
 
Oh, sorry, I am trying to place the code, but it gives an error, because I have there followign code already, where shoudl i place it please?section.png
 
Refer back to my first post #2 :

"The following, paste into the Sheet Module, will play the TADA sound when any change is made to the sheet :"


Include a 'call' to the email macro in the above.
 
Back
Top