Function CondFormula(myCell, Optional cond As Long = 1, _ Optional cond2 as Long = 1) As String 'Bernie Deitrick programming 2000-02-18, modified D.McR 2001-08-07, 2002-02-07, 2004-06-13 Application.Volatile CondFormula = "" On Error Resume Next if cond2 = 2 then 'second formula if rannge type C.F. CondFormula = myCell.FormatConditions(cond).Formula2 else 'preferred if only one formula CondFormula = myCell.FormatConditions(cond).Formula1 End Function=CondFormula(D14, 1) -- for the 1st of 3 possible conditions
Please send your comments concerning this web page to: David McRitchie send email comments
Copyright © 1997 - 2004, F. David McRitchie, All Rights Reserved