Question : Excel 2007 Conditional Formatting Data Bars vertical display

How can I set the Data Bars conditional formatting in Excel 2007 to display in a vertically
I have a table that tracks several Issues for several departments and I have the Data Bars showing in the horizontal way the Issues totals, but I need to do the same with Departments totals (headers)
Thanks in advance for the input

Answer : Excel 2007 Conditional Formatting Data Bars vertical display

I don't believe Conditional Formatting will do what you want.

Here is a macro that will scale the cells in a selection with vertical color gradients. Select the cells, then run the ColorMe macro. It will put rectangles in the left side of the cell, with powder blue "data bars" having a vertical orientation. You'll need to rerun the macro everytime the cell values change. This latter step could be done with a Worksheet_Change event macro.

Brad
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
Sub ColorMe()
VerticalDataBar Selection, 14922893     'Vertical gradient color bars in powder blue
End Sub
 
Sub VerticalDataBar(rg As Range, lngColor As Long)
Dim dMin As Double, dMax As Double, dRange As Double, dScale As Double
Dim dHigh As Double, dWide As Double
Dim shp As Shape
Dim cel As Range
On Error Resume Next
dMin = 0                        'Scale the heights from a starting point of 0
'dMin = Application.Min(rg)     'Scale the heights from the smallest value
dMax = Application.Max(rg)
dRange = dMax - dMin
dHigh = rg.RowHeight
dWide = dHigh
With rg.Worksheet
    For Each cel In rg.Cells
        Set shp = Nothing
        Set shp = .Shapes("VDataBar" & cel.Address)
        If Not shp Is Nothing Then shp.Delete
        If IsNumeric(cel) Then
            dScale = dHigh * (cel.Value - dMin) / dRange
            With .Shapes.AddShape(msoShapeRectangle, cel.Left, cel.Top + cel.RowHeight - dWide, dWide, dWide)
                .Name = "VDataBar" & cel.Address
                .Fill.ForeColor.RGB = lngColor
                .Fill.OneColorGradient msoGradientVertical, 1, 1
                .Line.Visible = msoFalse
                .Rotation = 270
                .Width = dScale
            End With
        End If
    Next
End With
On Error GoTo 0
End Sub
Open in New Window Select All
Random Solutions  
 
programming4us programming4us