ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Setting up and Configuration of Excel (https://www.excelbanter.com/setting-up-configuration-excel/)
-   -   Chamfer Cells (https://www.excelbanter.com/setting-up-configuration-excel/194104-chamfer-cells.html)

Bill July 8th 08 08:26 PM

Chamfer Cells
 
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.

Gord Dibben July 8th 08 10:40 PM

Chamfer Cells
 
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.Coun t)
.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

On Tue, 8 Jul 2008 12:26:15 -0700, Bill wrote:

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.




All times are GMT +1. The time now is 05:12 PM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
ExcelBanter.com