How to Use If-Then Excel Equations to Color Cells
By C. Taylor
Updated September 28, 2017
You may already be familiar with Excel's IF function, which allows you to perform calculations based on certain criteria. You can use a similar if-then function to color the cells in Excel. This feature is found in "conditional formatting." Although this feature does not necessitate entering the function IF, the function is identical. As an example, you could tell your computer "if the calculated number is negative, then color the cell red."
Highlight the cells that you want to apply conditional formatting to. You can do this by clicking and dragging your mouse across the cells.
Click the "Home" tab.
Click "Conditional Formating" in the "Styles" group, point to "Highlight Cells Rules" then click "More Rules."
Enter the criteria in the "Edit only cells with" section. To configure the previously cited example, select "Cell Value" in the first drop-down menu, "less than" in the second drop-down menu, and type "0" in the last field. This reads "if the value in the selected cells are less than 0, then."
Click "Format" in the bottom section.
Click the "Fill" tab in the "Format Cells" window.
Click the color you want to use from the palate, then click "OK."
Click "OK" in the "New Formatting Rule" window to apply the conditional formatting. Any cells that meet your criteria will be colored.
C. Taylor embarked on a professional writing career in 2009 and frequently writes about technology, science, business, finance, martial arts and the great outdoors. He writes for both online and offline publications, including the Journal of Asian Martial Arts, Samsung, Radio Shack, Motley Fool, Chron, Synonym and more. He received a Master of Science degree in wildlife biology from Clemson University and a Bachelor of Arts in biological sciences at College of Charleston. He also holds minors in statistics, physics and visual arts.