Chamfer Cells

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Hi,
I have a work sheet and the gridlines are tuned off.
The work sheet has a white backround and has groups of cells green in colour
within the white backround. Is it possible to chamfer the corners of the
green cells for aesthetic purposes?

Thanking you in advance.
 
Bill

First clear the background green color then select a range of cells and run this
macro to produce a semi-transparent colored shape over the cells.

Note: you can select multiple ranges to run on.

Sub RoundRectangle()
Dim X, y As Single, area As Range
For Each area In Selection.Areas
With area
X = .Height * 0#
y = .Width * 0#
ActiveSheet.Rectangles.Add Top:=.Top - X, Left:=.Left - y, _
Height:=.Height + 1 * X, Width:=.Width + 1 * y
End With
With ActiveSheet.Rectangles(ActiveSheet.Rectangles.Count)
.Interior.ColorIndex = 10
.ShapeRange.AutoShapeType = msoShapeRoundedRectangle
.ShapeRange.Fill.Transparency = 0.8
.ShapeRange.Line.Weight = 1.25
End With
Next area
End Sub


Gord Dibben MS Excel MVP
 
Back
Top