- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Apply Conditional Formatting for Each Row in Excel
Conditional formatting, as we all know, will generate a rule that will decide which cells get formatted and how they should be formatted. It's possible that you'll wish to use the conditional formatting for per row at some point.
Using conditional formatting, for instance, you might want to fill the background color of the cells in this area with a different color if cell A2 is greater than cell B2, A3 is greater than cell B3, and so on.
Let’s understand step by step with an example.
At first, we must create a sample data, as shown in the following screenshot.
In the first step, you need to apply the conditional formatting to the range A2:B2. After making your selection in A2:B2, go to the Home tab, then click Conditional Formatting and select New Rule. Refer the screenshot below.
In the New Formatting Rule dialogue box, select Use a formula to determine which cells to format from the section titled Select a Rule Type. Next, in the textbox located under Format values where this formula is true, type the formula "=$A2>$B2".
Click the Format button to open the Format Cells window. Under the Fill section, choose any colour of your choice and click the OK button.
Now, click the OK button to close the New formatting Rule window.
Now, the conditional formatting is applied to rows A2:B2.
In the next step, select the data range from A2:B9 and choose conditional formatting option under Home tab and choose manage rules.
Find the rule you applied to A2:B9 in the Conditional Formatting Rules Manager window, modify the range as needed in the Applies to section, and click OK.
Now, for each row in the new range, this conditional formatting rule will be implemented. Refer to the below screenshot.
In this tutorial, we explained how you can apply conditional formatting to a data range based on the custom conditions stated in conditional formatting rules.
Kickstart Your Career
Get certified by completing the courseGet Started