Kiloelectronvolt
Board Regular
- Joined
- Oct 5, 2015
- Messages
- 81
- Office Version
- 365
- Platform
- Windows
Hi All, I found this code online, but I can't stand the color options in the index. I'm a noob and can't get it to switch to RGB format. Can someone please help? Thanks!
VBA Code:
Sub ShadeRows()
'Updateby20140529
Dim Rng As Range
Dim WorkRng As Range
Dim shadeIt As Boolean
shadeIt = True
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
For Each Rng In WorkRng.Rows
If Not Rng.EntireRow.Hidden Then
Rng.Interior.ColorIndex = _
IIf(shadeIt, 15, xlNone)
shadeIt = Not (shadeIt)
End If
Next
End Sub