Hi,
I have a loop that checks for a sample:
Code:If strTempAry(ciclo, 5) <= V_AV Then
Wonder if you can pass as a parameter in vba: "<", "<=", ">", ">=", "=", "<>"Code:If strTempAry(ciclo, 5) >= V_AV Then
Thanks in advance
Hi,
I have a loop that checks for a sample:
Code:If strTempAry(ciclo, 5) <= V_AV Then
Wonder if you can pass as a parameter in vba: "<", "<=", ">", ">=", "=", "<>"Code:If strTempAry(ciclo, 5) >= V_AV Then
Thanks in advance
Try something like
Code:Function CheckValues(varComp1 As Variant, varComp2 As Variant, strCheckString As String) As Boolean
CheckValues = Application.Evaluate(varComp1 & strCheckString & varComp2)
End Function
Sub Test()
MsgBox CheckValues(strTempAry(ciclo, 5), V_AV, "<=")
End Sub
Hi,
Thanks for the suggestion, I did not know you could do it that way.
I was already thinking about how many lines of code I had applications for such a comparison when the policy is in a spreadsheet cell
Code:If strTempAry(ciclo, 5) <= V_AV And strTempAry(ciclo, 6) >= V_AV Then