tsitsicat1
New Member
- Joined
- Jun 27, 2018
- Messages
- 10
Hello everyone!!!
I use a vba code that formats a certain column in my file
Sub coloraki()
Dim lr As Long, i As Long
lr = Range("B" & Rows.Count).End(xlUp).Row
For i = 1 To lr
If Range("H" & i) < 0 Then Range("B" & i).Interior.ColorIndex = 40
If Range("H" & i) > Range("B" & i) Then Range("B" & i).Interior.ColorIndex = 35
If Range("H" & i) > 0 And Range("H" & i) < Range("B" & i) Then Range("B" & i).Interior.ColorIndex = 36
Next i
End Sub
How is it possible to color also columns B:Η?
Can you help me?
Thanks in advance!!!
I use a vba code that formats a certain column in my file
Sub coloraki()
Dim lr As Long, i As Long
lr = Range("B" & Rows.Count).End(xlUp).Row
For i = 1 To lr
If Range("H" & i) < 0 Then Range("B" & i).Interior.ColorIndex = 40
If Range("H" & i) > Range("B" & i) Then Range("B" & i).Interior.ColorIndex = 35
If Range("H" & i) > 0 And Range("H" & i) < Range("B" & i) Then Range("B" & i).Interior.ColorIndex = 36
Next i
End Sub
How is it possible to color also columns B:Η?
Can you help me?
Thanks in advance!!!