D | E | F | G | H | I | |
1 | Invoice Date | Amount | Check Date | Check # | $ Inv Paid | Check $ |
2 | 6/1/2002 | $5000 | 6/23/2002 | 1234 | $0.00 | $0.00 |
3 | 5/1/2003 | $4400 | 5/15/2003 | 4576 | $4400 | $8000 |
4 | 7/5/2004 | $100 | 7/28/2004 | 9886 | $500 | $6000 |
<tbody>
</tbody>
Happy New Year! I need some guidance for creating vba code to run multiple conditional formatting rules.
- On Column F = D2+20>F2 Check date must be 20 days after invoice date, if not = condl highlight
- On Column H = H2<>E2 Amount should = $ Inv Paid, if not = condl highlight
- On Column I = I2<H2 Check $ must be greater than $ Inv Paid, if not = condl
Here's what I have so far..
With Range("F2").FormatConditions.Add(Type:=xlExpression, Formula1:="=D2+20>F2")
.Interior.Color = RGB(248, 203, 173)
End With
Range("F2").NumberFormat = "m/d/yyyy"
With Range("H2").FormatConditions.Add(Type:=xlCellValue, Operator:=xlNotEqual, Formula1:="=E2")
.Interior.Color = RGB(248, 203, 173)
End With
With Range("I2").FormatConditions.Add(Type:=xlCellValue, Operator:=xlLess, Formula1:="=H2")
.Interior.Color = RGB(248, 203, 173)
End With