MyFlight
Technical User
- Feb 4, 2002
- 193
Does anyone know if there is an easy way in Excel to write a Macro to do the following.
I have 2 Formulas in Cells L10 and M10. If the value is over Zero I wnat to change the Cell Color and formatting of another Cell and then delete the Formulas.
Basically if L10 is Greater than 0 the format Cell L8 (Red Cell, White Letters)
Range("L8").Select
Range("L10").FormulaR1C1 = "=SUM(COUNTIF(Status!C[-9],""SLMB*""),COUNTIF(Status!C[-9],""SLMD*""),COUNTIF(Status!C[-9],""SLMQ*""),COUNTIF(Status!C[-9],""WAML*""))"
Basically if L10 is Greater than 0 the format Cell L8 (Red Cell, White Letters)
Range("M8").Select
Range("M10").FormulaR1C1 = "=SUM(COUNTIF(Status!C[-10],""SLMB*""),COUNTIF(Status!C[-10],""SLMD*""),COUNTIF(Status!C[-10],""SLMQ*""),COUNTIF(Status!C[-10],""WAML*""))"
In addition I need to add a comment to K10 "Count Difference"
Any and all help will be appreciated.
I have 2 Formulas in Cells L10 and M10. If the value is over Zero I wnat to change the Cell Color and formatting of another Cell and then delete the Formulas.
Basically if L10 is Greater than 0 the format Cell L8 (Red Cell, White Letters)
Range("L8").Select
Range("L10").FormulaR1C1 = "=SUM(COUNTIF(Status!C[-9],""SLMB*""),COUNTIF(Status!C[-9],""SLMD*""),COUNTIF(Status!C[-9],""SLMQ*""),COUNTIF(Status!C[-9],""WAML*""))"
Basically if L10 is Greater than 0 the format Cell L8 (Red Cell, White Letters)
Range("M8").Select
Range("M10").FormulaR1C1 = "=SUM(COUNTIF(Status!C[-10],""SLMB*""),COUNTIF(Status!C[-10],""SLMD*""),COUNTIF(Status!C[-10],""SLMQ*""),COUNTIF(Status!C[-10],""WAML*""))"
In addition I need to add a comment to K10 "Count Difference"
Any and all help will be appreciated.