ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formatting (https://www.excelbanter.com/excel-discussion-misc-queries/203944-formatting.html)

Graciegirl

Formatting
 
Do I have to create a macro if I want all color filled cells to be unfilled
upon saving? I don't want to create a macro.
--
Gracie

Mike H

Formatting
 
Hi,

You have 2 choices. You manually select the cells in each sheet and clear
any fill colours or put up with a macro which isn't difficult or intrusive.
If you go with the macro idea do this

Alt +F11 to open Vb editor. Double click 'This workbook' and paste this in
on the right. It won't clear conditional format colouring

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.UsedRange.Interior.ColorIndex = xlNone
Next
End Sub

Mike

"Graciegirl" wrote:

Do I have to create a macro if I want all color filled cells to be unfilled
upon saving? I don't want to create a macro.
--
Gracie


Dave Peterson

Formatting
 
You could name all the cells that you want cleared.

Select the cells (click on the first, ctrl-click on subsequent).
Then type the name for this selection in the namebox (to the left of the formula
bar). Remember to hit enter after you finish typing the name.

Then you can select this range (type it in the namebox or Edit|goto and type the
name), then hit the delete key to clear the contents of those selected cells.



Graciegirl wrote:

Do I have to create a macro if I want all color filled cells to be unfilled
upon saving? I don't want to create a macro.
--
Gracie


--

Dave Peterson


All times are GMT +1. The time now is 01:59 PM.

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