ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Shape Outline (border) (https://www.excelbanter.com/excel-discussion-misc-queries/182860-shape-outline-border.html)

Neil Pearce

Shape Outline (border)
 
Good afternoon all,

A building's ground floor plan is created visually by a user in Excel by
highlighting cells and filling them with the colour red. Each cell on the
workbook is equivalent to 1m2. The building must fit into a 50x50 plot area
B2:AY51.

I now need to enable the user to input different floor finishes within this
footprint. Therefore I wish to place an outline border of the drawn shape
into a new workbook so that the user can fill the shape with different colour
fills (each representing a different floor finsih, e.g. carpet, vinyl etc.)

Is there a way of creating a code to do this that can then be attached to a
button?


Many thanks,

Neil

Neil Pearce

Shape Outline (border)
 
I imagine the code would do something like:

Select range

If cell is white... do nothing and pass on to the next cell

If a cell is red...
check the colour of cell above...
If that is white, place border; if red do nothing...
check the colour fo the cell to the right....
If that is white, place border; if red do nothing...

Then repeat for cells to the bottom and the left.

End

"Neil Pearce" wrote:

Good afternoon all,

A building's ground floor plan is created visually by a user in Excel by
highlighting cells and filling them with the colour red. Each cell on the
workbook is equivalent to 1m2. The building must fit into a 50x50 plot area
B2:AY51.

I now need to enable the user to input different floor finishes within this
footprint. Therefore I wish to place an outline border of the drawn shape
into a new workbook so that the user can fill the shape with different colour
fills (each representing a different floor finsih, e.g. carpet, vinyl etc.)

Is there a way of creating a code to do this that can then be attached to a
button?


Many thanks,

Neil



All times are GMT +1. The time now is 05:54 AM.

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