KP_SoCal
Board Regular
- Joined
- Nov 17, 2009
- Messages
- 116
I'm using some basic code below in an on Workbook Open event to format cells with a value less then 2 and less than 1 with a particular color.
The code works, but it really slows my worksheet down when opening. Is there better way to write this? Thanks!
The code works, but it really slows my worksheet down when opening. Is there better way to write this? Thanks!
Code:
Dim myRange As Range
Dim cell As Range
Set myRange = Range("V6:V50000")
For Each cell In myRange
If cell.Value < 2 Then cell.Font.ColorIndex = 5
If cell.Value < 1 Then cell.Font.ColorIndex = 3
Next
Last edited: