Hello
I am using Excel 2003. I have a workbook with many worksheets. In one worksheet I want to conditional format the colour of a cell based on the results in another worksheet.
I tried to use the conditional format feature but it doesn't allow cell reference to other worksheets thus the need to use VBA.
This is what I have so far but it's not working:
I've placed the above in the sheet where cell C18 resides. Please advise what I'm doing wrong - thanks.
I am using Excel 2003. I have a workbook with many worksheets. In one worksheet I want to conditional format the colour of a cell based on the results in another worksheet.
I tried to use the conditional format feature but it doesn't allow cell reference to other worksheets thus the need to use VBA.
This is what I have so far but it's not working:
Code:
[C18].CurrentRegion.Select
With Selection
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=OR(ISTEXT(Summary!R[22]C[-3]),Summary!R[22]C[-3]<Summary!R[25]C[-3]*0.75)"
.FormatConditions(1).Interior.ColorIndex = 3
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND(Summary!R[22]C[-3]<Summary!R[25]C[-3],Summary!R[22]C[-3]>=Summary!R[25]C[-3]*0.75)"
.FormatConditions(2).Interior.ColorIndex = 6
.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreaterEqual _
, Formula1:="=""Summary!R[25]C[-3]"""
.FormatConditions(3).Interior.ColorIndex = 10
End With
I've placed the above in the sheet where cell C18 resides. Please advise what I'm doing wrong - thanks.