Excel Macro: Change Cell Fill Color On & Off - Quick & Easy Toggle Macro
Learn how to write a very simple and very quick toggle macro in Microsoft Excel. This macro changes the fill color in a cell to a chosen color or removes the color if the cell is already filled with that color. It operates with a simple IF statement and is easy to create and a great example of how to create a toggle macro in the situation where you want to manage something that doesn't have a simple on/off type switch that you can use.
This is the code for the macro:
Sub switchColours()
If Selection.Interior.ThemeColor = xlThemeColorAccent3 Then
Selection.Interior.ThemeColor = xlNone
Else
Selection.Interior.ThemeColor = xlThemeColorAccent3
Selection.Interior.TintAndShade = 0.8
End If
End Sub
VIEW MORE VIDEOS JUST LIKE THIS ON MY YOUTUBE CHANNEL
Microsoft Office ► / @mastermicrosoftoffice
TIP ME TO SAY THANK YOU? ► paypal.me/projectwoman
IF YOU LIKED THIS VIDEO YOU MAY LIKE THESE SIMILAR VIDEOS:
Save Time in Excel: Quick Math Operations with Copy-Paste - Apply Math Operation to all Data► • Save Time in Excel: Quick Math Operations ...
Loan Math: Excel Calculations Made Easy ► • Calculate Loan Repayments in Excel
Excel Printable Watermark - Only Uses Excel, Customizable & Easy to Make ► • Watermark a Worksheet Quick & Easy Excel
Excel: Control What You See with Views - Quick & Easy Screen Customization ► • Excel: Control What You See with Views - Q...
Excel Set up & Use Constants in Worksheets ► • Excel Set up & Use Constants in Worksheets
You're Doing it Wrong - Excel is NOT a Calculator ► • Excel Mistake You’re Making - Excel is NOT...
Absolute or Relative? Navigate Cell Addressing in Excel ► • Absolute or Relative? Navigate Cell Addres...
The Art of Adding Text to Numbers in Excel ► • Add Text to Numbers in Excel
What to do when Excel Averages Go Wrong - Understand & Fix the Problems ► • When Excel Averages Go Wrong - Understand ...
The Danger of Using Numbers for Column Headings in Excel ► • Danger: Don’t Use Numbers for Column Headi...
Mastering Excel Headers and Footers: A Beginner's Guide ► • Master Excel Headers & Footers: A Beginner...
Excel one click custom data entry form for any worksheet ► • Excel Custom Data Entry Form for any Works...
Control Data Input - Force Yes or No entries in Excel! ► • Force Yes or No entries in Excel!
Dynamic File List in Seconds with Excel Power Query - Simple & Fast ► • Dynamic File List in Seconds with Excel Po...
Simplify Data Visualization with Excel Waffle Charts ► • Video
Data Visualization Pro Tip: Dotted Circle Chart in Excel ► • Data Visualization Pro Tip: Dotted Circle ...
From List to Dialog: Excel Macro for Smart Data Input ► • Easy Excel Macro for Smart Data Input - Se...
Customization 101: How to Draw and Erase Cell Borders in Excel ► • Customization 101: How to Draw and Erase C...
From Data to Insight: Two Quick Ways to Master Percents in Excel ► • From Data to Insight: Two Quick Ways to Ma...
Sum a Column of Numbers in Excel for Beginners - Manual & Auto Methods ► • Add a Column of Numbers in Excel for Begin...
Excel Sorting Secrets: Essential Tips for New Users ► • Excel Essential Sorting Tips for New Users
From Bland to Grand: Beautiful Option Buttons for Excel Worksheets ► • Create Beautiful Option Buttons for Excel ...
Basic Excel Skills for Job Seekers and Students - Essential Skills Made Easy ► • Must Know Excel Skills for Job Seekers & S...
Org Chart Basics: Data Prep and Creation in Excel ► • Organization Chart in Excel: Data Prep and...
Place Text in Shapes in Excel & Word - Understand the Differences ► • Place Text in Shapes in Excel & Word - Und...
Excel Hack: Printable square & ratio grids made easy ► • Excel square and ratio pixel grids made easy
Excel Ruler Hacks: Set Measurements in Inches, Centimeters or Millimeters ► • Excel Hacks: Set Cell Measurements in Inch...
Excel For MAC! Save to Disc and NOT OneDrive: How to bypass OneDrive on the Mac ► • Excel For MAC! Save to Disc not OneDrive: ...
#helenbradley #microsoftexcel #microsoftoffice #projectwoman #Excelforstudents #excelforbeginners #ExcelMacro #ExcelVBA