ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Color Background cells in workbook (https://www.excelbanter.com/excel-programming/338107-color-background-cells-workbook.html)

Diggsy

Color Background cells in workbook
 
I was wondering if it is possible to create a macro that will fill all cells
that are blank in my workbook with a certain color(actually gray) so that it
looks presentable?

Thank you

Diggsy

Bill Kuunders

Color Background cells in workbook
 
Sub blankgray()
Selection.SpecialCells(xlCellTypeBlanks).Select
With Selection.Interior
.ColorIndex = 15
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
End Sub

This will colour all blank cells up to your "end" cell.
I.e. you may have to have a non-blank cell(space?) further down and to the
left of
your normal range, to get the desired effect.

--
Greetings from New Zealand
Bill K
"Diggsy" wrote in message
...
I was wondering if it is possible to create a macro that will fill all
cells
that are blank in my workbook with a certain color(actually gray) so that
it
looks presentable?

Thank you

Diggsy




smonczka

Color Background cells in workbook
 
Diggsy, use Conditional Formating, it's under the Format menu.

Highlight the section you want to format and select Format --
Conditional formating.
Fool around with it a bit and you'll get the hang of it.

Also check out http://www.contextures.on.ca/xlCondFormat02.html
for other tips on conditional formating.

SMonczka



All times are GMT +1. The time now is 06:04 AM.

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