troubleshooting Question

Excel Alerts Part II

Avatar of cpatte7372
cpatte7372Flag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft Excel
26 Comments1 Solution235 ViewsLast Modified:
Hello Experts,

An expert compiled the following formula which works perfectly.

Sub checkall()
Set ws = Sheets("mini sized DOW")
For Each rw In ws.Range("A3:A" & Range("B3").End(xlDown).Row)
For Each cel In Range("$AY$" & rw.Row & ":$AZ$" & rw.Row & ",$BB$" & rw.Row & ",$BD$" & rw.Row)
    For Each cf In cel.FormatConditions
        frmla = cf.Formula1
        frmla = Application.ConvertFormula(frmla, xlA1, xlR1C1, , cf.AppliesTo.Cells(1, 1))
        frmla = Application.ConvertFormula(frmla, xlR1C1, xlA1, , cel)
        If Evaluate(frmla) Then
            If cf.Interior.Color <> 5296274 Then stts = "": Exit For
            stts = "green"
            Exit For
        End If
    Next cf
    If stts <> "green" Then Exit For
Next cel
If stts = "green" Then cplist = cplist & rw.Cells(1, 2) & ", "
stts = ""
Next rw
MsgBox "All cells are green for" & vbCrLf & Left(cplist, Len(cplist) - 2)
End Sub

I was wondering if the same expert or another expert could tweak it for me so that the pop up message appears when four of the conditions appear rather than when each individual condition appears. At the moment, I need to manually run the macro and it will also appear whenever an individual condition occurs. I would like it automatically occur when four of the same conditions are currently occurring

I have attached the spreadsheet for illustration.
EEMINI-DOW.xlsm
ASKER CERTIFIED SOLUTION
Saqib Husain
Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 26 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 26 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros