How do I set up conditional formatting to give the greenbareffect?
On Jan 8, 8:32*am, "Saucer Man" wrote:
I want my excel workbook to have the greenbar effect starting with row 4. *I
have 12 worksheets in the workbook. *I would like the sheets to have this
effect as the data is being entered row by row daily. *How can I do this?
--
Thanks!
I am using the macro below since many years.
You select the area you want to be subject to the greenbar effect and
run the macro.
Change the ColorIndex number to get green.
Have fun!
~~~~~~~~~
'Make GreenBar spreadsheet
'
Sub GreenBar()
Application.ScreenUpdating = False
Dim iRows, iStartRow, iEndRow As Integer
Dim iColumns, iStartColumn, iEndColumn As Integer
Dim RCounter, CCounter As Integer
With Selection
iRows = .Rows.Count
iStartRow = .Row
iEndRow = .Row + iRows - 1
iColumns = .Columns.Count
iStartColumn = .Column
iEndColumn = .Column + iColumns - 1
End With
For RCounter = iStartRow + 1 To iEndRow Step 2
For CCounter = iStartColumn To iEndColumn
With Cells(RCounter, CCounter).Interior
.ColorIndex = 36
.Pattern = xlSolid
End With
Next CCounter
Next RCounter
End Sub
|