{"id":12119,"date":"2012-01-18T17:45:36","date_gmt":"2012-01-18T17:45:36","guid":{"rendered":"http:\/\/www.learnexcelmacro.com\/?p=1232"},"modified":"2022-08-07T00:50:50","modified_gmt":"2022-08-07T00:50:50","slug":"format-whole-row-or-a-range-by-conditional-formating","status":"publish","type":"post","link":"https:\/\/vmlogger.com\/excel\/2012\/01\/format-whole-row-or-a-range-by-conditional-formating\/","title":{"rendered":"How to format whole row or a Range by Conditional Formating"},"content":{"rendered":"
Sometimes in Excel, we need auto-formatting as soon as a condition in a particular cell or cell range is satisfied then the formatting of the whole row or a cell range should change. This is very easy to do in Excel by using Conditional Formatting.
\nLet’s take an example. Suppose you have the following data in the Excel Sheet
\n
Conditional Formatting for Range<\/p><\/div><\/p>\n
In the above format, you want that as soon as you select Status as “Failed”<\/strong> then for that row, all the Columns like Column A, Column B, Column C, and Column D, color should change to Red.<\/p>\n Now Select the Whole Range, where you want to Apply the formatting as shown in the above Picture.<\/p>\n Go to Home Tab –> Conditional Formatting<\/strong> Conditional Format on Range<\/p><\/div>\n Click OK Conditional Formating on Range<\/p><\/div>\n
\nNow Click on Use a formula to determine which cells to format<\/strong>
\nIn the formula bar, Enter the formula: =$D2=”Failed”<\/strong> as shown in the Picture.
\nNote: <\/strong>In the formula make sure that you are using $<\/strong> Sign before the Column Name. But you should not use this sign before Row Number.<\/p>\n
\nNow you can see that the selected Row color is changed to Red where ever Status is Selected as “Failed”. Refer below screen-shot.<\/p>\nNow if you want to change the Color of that complete row wherever the Status is Failed then Follow the below Steps:<\/h3>\n