WPS Office

Free All-in-One Office Suite with PDF Editor

correct-icon

Edit Word, Excel, and PPT for FREE.

correct-icon

Read, edit, and convert PDFs with the powerful PDF toolkit.

correct-icon

Microsoft-like interface, easy to use.

Free download

Windows • MacOS • Linux • iOS • Android

banner

How to fill color in excel cell using formula

February 13, 2023
22.6K Views

How to fill color in excel cell using formula? You can do this by conditional formatting option. When you use colors in your excel worksheets you can instantly visualize the difference or comparison in value. Additionally, specification of important information gets easy. In order to specify the condition, you can use IF statement and then use conditional formatting to highlight the conditions.

If you are wondering how to fill color in excel cell using formula, here is your guide to it. So, read entire article.

Note: There is only one way to access conditional formatting as below

Use colors under certain conditions

1. Open the document having some data. Here is an example of test grades of students in terms of percentage. In this data many students passed while few failed. If we need to find fail students without wasting time, use conditional formatting.

2. Use the IF statement before applying colors. To do this, click on C3.

3. Now type equals sign and if in this cell. Then press Enter, the IF statement is activated

4. Now go to cell B3, click it and type st part of condition telling if the cell value is less than 40.

5. Now type comma, and then write Fail in inverted commas like this  “Fail”

6. Again type comma, and then write Pass in inverted commas. This is the full condition which means that if the value is less than 40, type fail, otherwise pass.

7. When you press Enter key. The Pass word is shown because the student scored more than 40% grades.

8.In order to apply this function to all cells till end, click on the cell C3 again then click the right corner of the cell, drag vertically till B28.

9. Now to apply conditional formatting, click again on cell C3 and go to Conditional Formatting under Home tab. A drop down box appears.

10. Put your mouse at Highlight Cell Rules, a drop down box appears.

11. Click “Text That Contains” option in drop down menu.

12. A dialogue box opens. Now click the arrow at the right of blank field.

13. Now click C3 and press Enter. Notice the value is specified.

14. Now click on the down arrow. A drop box appears to select colors.

15. Click Light Red Fill for this example.

16. Click Ok. The text in cell C3 is filled with light red color.

17. Click on C3 cell, hover mouse at bottom right corner, click and drag. All the text containing word Pass get highlighted.

18. Now to find which student failed, repeat the whole procedure but type Fail in “Text That Contains” dialogue box and select “Green Fill With Dark Green Text” as the color.

19. Press Enter. Nothing happens to C3 as the cell has word Pass.

20. when you click and drag cursor from C3 to C28. All the cells having Fail written get highlighted in different color.

So this is whole process of how to fill color in excel cell using formula. Need to edit Word/Excel/PPT file free of charge? download WPS Office edit files like without any cost. Download now! to get enjoyable working experience.

15 years of office industry experience, tech lover and copywriter. Follow me for product reviews, comparisons, and recommendations for new apps and software.