I got this excellent answer (below) to a previous question and it works like a charm. My question is how would I add more Evaluates to this. e.g. the same formula but for the row below it. I want a single msgbox to popup if any of the rows (I have about 10) make the formula true.

Thanks.

Private Sub worksheet_deactivate()Dim varReturnvarReturn = Evaluate("IF(AND(AND(OR(((F8-I8)/I8>0.2),((F8-I8)/I8<-0.2)),NOT(ISBLANK(I8)),NOT(ISBLANK(F8))),AND(NOT(ISBLANK(F8)),NOT(ISBLANK(G8)),NOT(ISBLANK(H8)),NOT(SUM(G8+H8)=F8))),TRUE,FALSE)") If Not IsError(varreturn) Then If varReturn Then MsgBox "Test", vbOKCancelEnd IfEnd Sub

Private Sub worksheet_deactivate() Dim varReturn Dim rngCell As Range ' change range as needed For Each rngCell In Range("A1:A10") varReturn = Evaluate(Mid$(rngCell.FormatConditions(1).Formula1, 2)) If Not IsError(varReturn) Then If varReturn Then MsgBox "Test", vbOKCancel ' assumes you want to exit if any of them are true Exit Sub End If Next rngCellEnd Sub

There is a missing end if in the rorya code
try this

Private Sub worksheet_deactivate() Dim varReturn Dim rngCell As Range ' change range as needed For Each rngCell In Range("A1:A10") varReturn = Evaluate(Mid$(rngCell.FormatConditions(1).Formula1, 2)) If Not IsError(varReturn) Then If varReturn Then MsgBox "Test", vbOKCancel ' assumes you want to exit if any of them are true Exit Sub end if End If Next rngCellEnd Sub

Private Sub worksheet_deactivate() Dim varReturn Dim rngCell As Range ' change range as needed For Each rngCell In Range("F8:F15") varReturn = Evaluate(Mid$(rngCell.FormatConditions(1).Formula1, 2)) If Not IsError(varReturn) Then If varReturn Then MsgBox "Test", vbOKCancel ' assumes you want to exit if any of them are true Exit Sub end if End If Next rngCellEnd Sub

Try this one
I have checked the error in the case you include a cell without CF and I've noticed that you should replace ";" with "," in the evaluate formula.

There is another problem: this solution works only if the language is English because the .formula1 property returns the condition translated in the current language, but the Evaluate function pretends only English input.

It is a very stupid thing that you have to input Excel's formulas translated in your country language, this makes hard to convert formulas for international customers support

Private Sub worksheet_deactivate() Dim varReturn Dim rngCell As Range Dim FormatCond As FormatCondition Dim intErr As Integer On Error GoTo ResetError intErr = 0 ' change range as needed For Each rngCell In Range("F8:F14") For Each FormatCond In rngCell.FormatConditions varReturn = Evaluate(Replace(Mid$(FormatCond.Formula1, 2), ";", ",")) If intErr = 0 Then If Not IsError(varReturn) Then If varReturn Then MsgBox "Test", vbOKCancel ' assumes you want to exit if any of them are true Exit Sub End If End If Else intErr = 0 End If Next Next rngCell Exit SubResetError:intErr = Err.NumberResume NextEnd Sub

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Introduction
While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful. I tested several solutions and share the results in this article as well as tâ€¦

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications. You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will diâ€¦

The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabilâ€¦

Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data.
Rather than update each graph to point to a different set within a static set of data, tâ€¦