hi all I have made an excel gantt chart using macros based on conditional formatting, in excel 2007.
what I would like to do is use it on excel 2003 however I am struggling to rewrite the macros to allow approximately 70 conditions per cell with various colours.
this is a sample of what worked in 2007 version.
Range("E12:IK14").Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND(Inputs!$D$3<=E$1,Inputs!$E$3>=F$1)"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.349986266670736
End With
Selection.FormatConditions(1).StopIfTrue = False
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND(Inputs!$g$3<=E$1,Inputs!$h$3>=F$1)"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.349986266670736
End With
this is repeated many times with additions of a third condition for the formula and a different colour.
i have tried to recreate this in 2003 however I have hit a wall.
i know 2003 and 2007 are old versions and there is not many people still using them but hopefully someone may still be able to help me
what I would like to do is use it on excel 2003 however I am struggling to rewrite the macros to allow approximately 70 conditions per cell with various colours.
this is a sample of what worked in 2007 version.
Range("E12:IK14").Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND(Inputs!$D$3<=E$1,Inputs!$E$3>=F$1)"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.349986266670736
End With
Selection.FormatConditions(1).StopIfTrue = False
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND(Inputs!$g$3<=E$1,Inputs!$h$3>=F$1)"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.349986266670736
End With
this is repeated many times with additions of a third condition for the formula and a different colour.
i have tried to recreate this in 2003 however I have hit a wall.
i know 2003 and 2007 are old versions and there is not many people still using them but hopefully someone may still be able to help me