Value of one cell based on another in Excel

{"appState":{"pageLoadApiCallsStatus":true},"articleState":{"article":{"headers":{"creationTime":"2016-03-26T10:54:12+00:00","modifiedTime":"2021-10-27T17:53:54+00:00","timestamp":"2022-02-24T17:07:05+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"//dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Software","_links":{"self":"//dummies-api.dummies.com/v2/categories/33618"},"slug":"software","categoryId":33618},{"name":"Microsoft Products","_links":{"self":"//dummies-api.dummies.com/v2/categories/33642"},"slug":"microsoft-products","categoryId":33642},{"name":"Excel","_links":{"self":"//dummies-api.dummies.com/v2/categories/33644"},"slug":"excel","categoryId":33644}],"title":"Highlight Excel Cells Based on the Value of Another Cell","strippedTitle":"highlight excel cells based on the value of another cell","slug":"highlight-excel-cells-based-on-the-value-of-another-cell","canonicalUrl":"","seo":{"metaDescription":"Learn how to base the formatting rule for your Excel cells on how they compare to the value of another cell.","noIndex":0,"noFollow":0},"content":"In some cases, you may want to base the formatting rule for your Excel cells on how they compare to the value of another cell. Take the example illustrated here. The cells are conditionally highlighted if their respective values fall below the Prior Year Average shown in cell B3.\r\n\r\n<img src=\"//sg.cdnki.com/value-of-one-cell-based-on-another-in-excel---aHR0cHM6Ly93d3cuZHVtbWllcy5jb20vd3AtY29udGVudC91cGxvYWRzLzQ0MTcxNC5pbWFnZTAuanBn.webp\" alt=\"image0.jpg\" width=\"535\" height=\"389\" />\r\n\r\nTo build this basic formatting rule, follow these steps:\r\n<ol class=\"level-one\">\r\n \t<li>\r\n<p class=\"first-para\">Select the data cells in your target range (cells E3:C14 in this example), click the Home tab of the Excel Ribbon, and then select Conditional Formatting→New Rule.</p>\r\n<p class=\"child-para\">This opens the New Formatting Rule dialog box.</p>\r\n<img src=\"//sg.cdnki.com/value-of-one-cell-based-on-another-in-excel---aHR0cHM6Ly93d3cuZHVtbWllcy5jb20vd3AtY29udGVudC91cGxvYWRzLzQ0MTcxNS5pbWFnZTEuanBn.webp\" alt=\"image1.jpg\" width=\"416\" height=\"400\" /></li>\r\n \t<li>\r\n<p class=\"first-para\">In the list box at the top of the dialog box, click the Use a Formula to Determine which Cells to Format option.</p>\r\n<p class=\"child-para\">This selection evaluates values based on a formula you specify. If a particular value evaluates to TRUE, the conditional formatting is applied to that cell.</p>\r\n</li>\r\n \t<li>\r\n<p class=\"first-para\">In the formula input box, enter the formula shown with this step.</p>\r\n<p class=\"child-para\">Note that you are simply comparing your target cell (E3) with the value in the comparison cell ($B$3). As with standard formulas, you need to ensure that you use absolute references so that each value in your range is compared to the appropriate comparison cell.</p>\r\n\r\n<pre class=\"code\">=E3<$B$3</pre>\r\n<p class=\"child-para\">Note that in the formula, you exclude the absolute reference dollar symbols ($) for the target cell (E3). If you click cell E3 instead of typing the cell reference, Excel automatically makes your <a href=\"//www.dummies.com/education/graphing-calculators/how-to-use-absolute-cell-references-in-lists-spreadsheet/\" target=\"_blank\" rel=\"noopener\">cell reference absolute</a>. It’s important that you don’t include the absolute reference dollar symbols in your target cell because you need Excel to apply this formatting rule based on each cell’s own value.</p>\r\n</li>\r\n \t<li>\r\n<p class=\"first-para\">Click the Format button.</p>\r\n<p class=\"child-para\">This opens the Format Cells dialog box, where you have a full set of options for formatting the font, border, and fill for your target cell. After you have completed choosing your formatting options, click the OK button to confirm your changes and return to the New Formatting Rule dialog box.</p>\r\n</li>\r\n \t<li>\r\n<p class=\"first-para\">Back in the New Formatting Rule dialog box, click the OK button to confirm your formatting rule.</p>\r\n<p class=\"child-para\">If you need to edit your conditional formatting rule, simply place your cursor in any of the data cells within your formatted range and then go to the Home tab and select Conditional Formatting→Manage Rules. This opens the Conditional Formatting Rules Manager dialog box. Click the rule you want to edit and then click the Edit Rule button.</p>\r\n</li>\r\n</ol>\r\nCurious to learn more? Take a look at these <a href=\"//www.dummies.com/software/microsoft-office/excel/7-tips-for-working-with-excel-formulas/\" target=\"_blank\" rel=\"noopener\">additional tips for working with Excel formulas</a>.","description":"In some cases, you may want to base the formatting rule for your Excel cells on how they compare to the value of another cell. Take the example illustrated here. The cells are conditionally highlighted if their respective values fall below the Prior Year Average shown in cell B3.\r\n\r\n<img src=\"//www.dummies.com/wp-content/uploads/441714.image0.jpg\" alt=\"image0.jpg\" width=\"535\" height=\"389\" />\r\n\r\nTo build this basic formatting rule, follow these steps:\r\n<ol class=\"level-one\">\r\n \t<li>\r\n<p class=\"first-para\">Select the data cells in your target range (cells E3:C14 in this example), click the Home tab of the Excel Ribbon, and then select Conditional Formatting→New Rule.</p>\r\n<p class=\"child-para\">This opens the New Formatting Rule dialog box.</p>\r\n<img src=\"//www.dummies.com/wp-content/uploads/441715.image1.jpg\" alt=\"image1.jpg\" width=\"416\" height=\"400\" /></li>\r\n \t<li>\r\n<p class=\"first-para\">In the list box at the top of the dialog box, click the Use a Formula to Determine which Cells to Format option.</p>\r\n<p class=\"child-para\">This selection evaluates values based on a formula you specify. If a particular value evaluates to TRUE, the conditional formatting is applied to that cell.</p>\r\n</li>\r\n \t<li>\r\n<p class=\"first-para\">In the formula input box, enter the formula shown with this step.</p>\r\n<p class=\"child-para\">Note that you are simply comparing your target cell (E3) with the value in the comparison cell ($B$3). As with standard formulas, you need to ensure that you use absolute references so that each value in your range is compared to the appropriate comparison cell.</p>\r\n\r\n<pre class=\"code\">=E3<$B$3</pre>\r\n<p class=\"child-para\">Note that in the formula, you exclude the absolute reference dollar symbols ($) for the target cell (E3). If you click cell E3 instead of typing the cell reference, Excel automatically makes your <a href=\"//www.dummies.com/education/graphing-calculators/how-to-use-absolute-cell-references-in-lists-spreadsheet/\" target=\"_blank\" rel=\"noopener\">cell reference absolute</a>. It’s important that you don’t include the absolute reference dollar symbols in your target cell because you need Excel to apply this formatting rule based on each cell’s own value.</p>\r\n</li>\r\n \t<li>\r\n<p class=\"first-para\">Click the Format button.</p>\r\n<p class=\"child-para\">This opens the Format Cells dialog box, where you have a full set of options for formatting the font, border, and fill for your target cell. After you have completed choosing your formatting options, click the OK button to confirm your changes and return to the New Formatting Rule dialog box.</p>\r\n</li>\r\n \t<li>\r\n<p class=\"first-para\">Back in the New Formatting Rule dialog box, click the OK button to confirm your formatting rule.</p>\r\n<p class=\"child-para\">If you need to edit your conditional formatting rule, simply place your cursor in any of the data cells within your formatted range and then go to the Home tab and select Conditional Formatting→Manage Rules. This opens the Conditional Formatting Rules Manager dialog box. Click the rule you want to edit and then click the Edit Rule button.</p>\r\n</li>\r\n</ol>\r\nCurious to learn more? Take a look at these <a href=\"//www.dummies.com/software/microsoft-office/excel/7-tips-for-working-with-excel-formulas/\" target=\"_blank\" rel=\"noopener\">additional tips for working with Excel formulas</a>.","blurb":"","authors":[],"primaryCategoryTaxonomy":{"categoryId":33644,"title":"Excel","slug":"excel","_links":{"self":"//dummies-api.dummies.com/v2/categories/33644"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[{"articleId":259741,"title":"How to Use the Excel 2019 Solver","slug":"how-to-use-the-excel-2019-solver","categoryList":["technology","software","microsoft-products","excel"],"_links":{"self":"//dummies-api.dummies.com/v2/articles/259741"}},{"articleId":259735,"title":"How to Password-Protect Your Excel 2019 File","slug":"how-to-password-protect-your-excel-2019-file","categoryList":["technology","software","microsoft-products","excel"],"_links":{"self":"//dummies-api.dummies.com/v2/articles/259735"}},{"articleId":259729,"title":"How to Create Forecast Worksheets in Excel 2019","slug":"how-to-create-forecast-worksheets-in-excel-2019","categoryList":["technology","software","microsoft-products","excel"],"_links":{"self":"//dummies-api.dummies.com/v2/articles/259729"}},{"articleId":259724,"title":"How to Use the 3D Map Feature in Excel 2019","slug":"how-to-use-the-3d-map-feature-in-excel-2019","categoryList":["technology","software","microsoft-products","excel"],"_links":{"self":"//dummies-api.dummies.com/v2/articles/259724"}},{"articleId":259717,"title":"Transforming a Data Query in the Power Query Editor in Excel 2019","slug":"transforming-a-data-query-in-the-power-query-editor-in-excel-2019","categoryList":["technology","software","microsoft-products","excel"],"_links":{"self":"//dummies-api.dummies.com/v2/articles/259717"}}],"fromCategory":[{"articleId":288828,"title":"Excel 2021 All-in-One For Dummies Cheat Sheet","slug":"excel-2021-all-in-one-for-dummies-cheat-sheet","categoryList":["technology","software","microsoft-products","excel"],"_links":{"self":"//dummies-api.dummies.com/v2/articles/288828"}},{"articleId":265521,"title":"How to Use the XLOOKUP Function in Excel 2016","slug":"how-to-use-the-xlookup-function-in-excel-2016","categoryList":["technology","software","microsoft-products","excel"],"_links":{"self":"//dummies-api.dummies.com/v2/articles/265521"}},{"articleId":263475,"title":"Notes and File Sharing features in Excel 2016 Update","slug":"notes-and-coauthoring-features-in-excel-2016-update","categoryList":["technology","software","microsoft-products","excel"],"_links":{"self":"//dummies-api.dummies.com/v2/articles/263475"}},{"articleId":263466,"title":"New Chart & Graphics features on Excel 2016 update","slug":"new-chart-graphics-features-on-excel-2016-update","categoryList":["technology","software","microsoft-products","excel"],"_links":{"self":"//dummies-api.dummies.com/v2/articles/263466"}},{"articleId":263453,"title":"New Formulas and Functions in Excel 2016","slug":"how-to-use-new-formula-and-functions-in-excel-2016-update","categoryList":["technology","software","microsoft-products","excel"],"_links":{"self":"//dummies-api.dummies.com/v2/articles/263453"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":281708,"slug":"excel-2019-all-in-one-for-dummies","isbn":"9781119517948","categoryList":["technology","software","microsoft-products","excel"],"amazon":{"default":"//www.amazon.com/gp/product/111951794X/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"//www.amazon.ca/gp/product/111951794X/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"//www.tkqlhce.com/click-9208661-13710633?url=//www.chapters.indigo.ca/en-ca/books/product/111951794X-item.html&cjsku=978111945484","gb":"//www.amazon.co.uk/gp/product/111951794X/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"//www.amazon.de/gp/product/111951794X/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"//www.dummies.com/wp-content/uploads/excel-2019-all-in-one-for-dummies-cover-9781119517948-203x255.jpg","width":203,"height":255},"title":"Excel 2019 All-in-One For Dummies","testBankPinActivationLink":"","bookOutOfPrint":false,"authorsInfo":"\n <p><b data-author-id=\"9027\">Greg Harvey, PhD,</b> is a veteran computer educator dating back to the days of DOS and Lotus 1-2-3. He has taught spreadsheet and database management courses at Golden Gate University and written dozens of books, including many in the <i>For Dummies</i> series. </p>","authors":[{"authorId":9027,"name":"Greg Harvey","slug":"greg-harvey","description":"Greg Harvey, PhD, was president of Mind Over Media and a highly skilled instructor. He wrote computer books for more than 20 years, and his long list of best sellers included all editions of Excel For Dummies, Excel All-in-One For Dummies, and Excel Workbook For Dummies. He died in 2020.","_links":{"self":"//dummies-api.dummies.com/v2/authors/9027"}}],"_links":{"self":"//dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;software&quot;,&quot;microsoft-products&quot;,&quot;excel&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119517948&quot;]}]\" id=\"du-slot-6217bb39be033\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;software&quot;,&quot;microsoft-products&quot;,&quot;excel&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119517948&quot;]}]\" id=\"du-slot-6217bb39be9db\"></div></div>"},"articleType":{"articleType":"Articles","articleList":null,"content":null,"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":"One year","lifeExpectancySetFrom":"2021-09-14T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":148984},"articleLoadedStatus":"success"},"listState":{"list":{},"objectTitle":"","status":"initial","pageType":null,"objectId":null,"page":1,"sortField":"time","sortOrder":1,"categoriesIds":[],"articleTypes":[],"filterData":{},"filterDataLoadedStatus":"initial","pageSize":10},"adsState":{"pageScripts":{"headers":{"timestamp":"2022-06-20T18:59:10+00:00"},"adsId":0,"data":{"scripts":[{"pages":["all"],"location":"header","script":"<!--Optimizely Script-->\r\n<script src=\"//cdn.optimizely.com/js/10563184655.js\"></script>","enabled":false},{"pages":["all"],"location":"header","script":"<!-- comScore Tag -->\r\n<script>var _comscore = _comscore || [];_comscore.push({ c1: \"2\", c2: \"15097263\" });(function() {var s = document.createElement(\"script\"), el = document.getElementsByTagName(\"script\")[0]; s.async = true;s.src = (document.location.protocol == \"\" ? \"//sb\" : \"//b\") + \".scorecardresearch.com/beacon.js\";el.parentNode.insertBefore(s, el);})();</script><noscript><img src=\"//sb.scorecardresearch.com/p?c1=2&c2=15097263&cv=2.0&cj=1\" /></noscript>\r\n<!-- / comScore Tag -->","enabled":true},{"pages":["all"],"location":"footer","script":"<!--BEGIN QUALTRICS WEBSITE FEEDBACK SNIPPET-->\r\n<script type='text/javascript'>\r\n(function(){var g=function(e,h,f,g){\r\nthis.get=function(a){for(var a=a+\"=\",c=document.cookie.split(\";\"),b=0,e=c.length;b<e;b++){for(var d=c[b];\" \"==d.charAt(0);)d=d.substring(1,d.length);if(0==d.indexOf(a))return d.substring(a.length,d.length)}return null};\r\nthis.set=function(a,c){var b=\"\",b=new Date;b.setTime(b.getTime()+6048E5);b=\"; expires=\"+b.toGMTString();document.cookie=a+\"=\"+c+b+\"; path=/; \"};\r\nthis.check=function(){var a=this.get(f);if(a)a=a.split(\":\");else if(100!=e)\"v\"==h&&(e=Math.random()>=e/100?0:100),a=[h,e,0],this.set(f,a.join(\":\"));else return!0;var c=a[1];if(100==c)return!0;switch(a[0]){case \"v\":return!1;case \"r\":return c=a[2]%Math.floor(100/c),a[2]++,this.set(f,a.join(\":\")),!c}return!0};\r\nthis.go=function(){if(this.check()){var a=document.createElement(\"script\");a.type=\"text/javascript\";a.src=g;document.body&&document.body.appendChild(a)}};\r\nthis.start=function(){var t=this;\"complete\"!==document.readyState?window.addEventListener?window.addEventListener(\"load\",function(){t.go()},!1):window.attachEvent&&window.attachEvent(\"onload\",function(){t.go()}):t.go()};};\r\ntry{(new g(100,\"r\",\"QSI_S_ZN_5o5yqpvMVjgDOuN\",\"//zn5o5yqpvmvjgdoun-wiley.siteintercept.qualtrics.com/SIE/?Q_ZID=ZN_5o5yqpvMVjgDOuN\")).start()}catch(i){}})();\r\n</script><div id='ZN_5o5yqpvMVjgDOuN'><!--DO NOT REMOVE-CONTENTS PLACED HERE--></div>\r\n<!--END WEBSITE FEEDBACK SNIPPET-->","enabled":false},{"pages":["all"],"location":"header","script":"<!-- Hotjar Tracking Code for //www.dummies.com -->\r\n<script>\r\n (function(h,o,t,j,a,r){\r\n h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\r\n h._hjSettings={hjid:257151,hjsv:6};\r\n a=o.getElementsByTagName('head')[0];\r\n r=o.createElement('script');r.async=1;\r\n r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\r\n a.appendChild(r);\r\n })(window,document,'//static.hotjar.com/c/hotjar-','.js?sv=');\r\n</script>","enabled":false},{"pages":["article"],"location":"header","script":"<!-- //Connect Container: dummies --> <script src=\"//get.s-onetag.com/bffe21a1-6bb8-4928-9449-7beadb468dae/tag.min.js\" async defer></script>","enabled":true},{"pages":["homepage"],"location":"header","script":"<meta name=\"facebook-domain-verification\" content=\"irk8y0irxf718trg3uwwuexg6xpva0\" />","enabled":true},{"pages":["homepage","article","category","search"],"location":"footer","script":"<!-- Facebook Pixel Code -->\r\n<noscript>\r\n<img height=\"1\" width=\"1\" src=\"//www.facebook.com/tr?id=256338321977984&ev=PageView&noscript=1\"/>\r\n</noscript>\r\n<!-- End Facebook Pixel Code -->","enabled":true}]}},"pageScriptsLoadedStatus":"success"},"navigationState":{"navigationCollections":[{"collectionId":287568,"title":"BYOB (Be Your Own Boss)","hasSubCategories":false,"url":"/collection/for-the-entry-level-entrepreneur-287568"},{"collectionId":293237,"title":"Be a Rad Dad","hasSubCategories":false,"url":"/collection/be-the-best-dad-293237"},{"collectionId":287563,"title":"For Those Seeking Peace of Mind","hasSubCategories":false,"url":"/collection/for-those-seeking-peace-of-mind-287563"},{"collectionId":287570,"title":"For the Aspiring Aficionado","hasSubCategories":false,"url":"/collection/for-the-bougielicious-287570"},{"collectionId":291903,"title":"For the Budding Cannabis Enthusiast","hasSubCategories":false,"url":"/collection/for-the-budding-cannabis-enthusiast-291903"},{"collectionId":291934,"title":"For the Exam-Season Crammer","hasSubCategories":false,"url":"/collection/for-the-exam-season-crammer-291934"},{"collectionId":287569,"title":"For the Hopeless Romantic","hasSubCategories":false,"url":"/collection/for-the-hopeless-romantic-287569"},{"collectionId":287567,"title":"For the Unabashed Hippie","hasSubCategories":false,"url":"/collection/for-the-unabashed-hippie-287567"},{"collectionId":292186,"title":"Just DIY It","hasSubCategories":false,"url":"/collection/just-diy-it-292186"},{"collectionId":290164,"title":"Make a Commitment to Better Yourself","hasSubCategories":false,"url":"/collection/make-a-commitment-to-better-yourself-290164"}],"navigationCollectionsLoadedStatus":"success","navigationCategories":{"books":{"0":{"data":[{"categoryId":33512,"title":"Technology","hasSubCategories":true,"url":"/category/books/technology-33512"},{"categoryId":33662,"title":"Academics & The Arts","hasSubCategories":true,"url":"/category/books/academics-the-arts-33662"},{"categoryId":33809,"title":"Home, Auto, & Hobbies","hasSubCategories":true,"url":"/category/books/home-auto-hobbies-33809"},{"categoryId":34038,"title":"Body, Mind, & Spirit","hasSubCategories":true,"url":"/category/books/body-mind-spirit-34038"},{"categoryId":34224,"title":"Business, Careers, & Money","hasSubCategories":true,"url":"/category/books/business-careers-money-34224"}],"breadcrumbs":[],"categoryTitle":"Level 0 Category","mainCategoryUrl":"/category/books/level-0-category-0"}},"articles":{"0":{"data":[{"categoryId":33512,"title":"Technology","hasSubCategories":true,"url":"/category/articles/technology-33512"},{"categoryId":33662,"title":"Academics & The Arts","hasSubCategories":true,"url":"/category/articles/academics-the-arts-33662"},{"categoryId":33809,"title":"Home, Auto, & Hobbies","hasSubCategories":true,"url":"/category/articles/home-auto-hobbies-33809"},{"categoryId":34038,"title":"Body, Mind, & Spirit","hasSubCategories":true,"url":"/category/articles/body-mind-spirit-34038"},{"categoryId":34224,"title":"Business, Careers, & Money","hasSubCategories":true,"url":"/category/articles/business-careers-money-34224"}],"breadcrumbs":[],"categoryTitle":"Level 0 Category","mainCategoryUrl":"/category/articles/level-0-category-0"}}},"navigationCategoriesLoadedStatus":"success"},"searchState":{"searchList":[],"searchStatus":"initial","relatedArticlesList":[],"relatedArticlesStatus":"initial"},"routeState":{"name":"Article4","path":"/article/technology/software/microsoft-products/excel/highlight-excel-cells-based-on-the-value-of-another-cell-148984/","hash":"","query":{},"params":{"category1":"technology","category2":"software","category3":"microsoft-products","category4":"excel","article":"highlight-excel-cells-based-on-the-value-of-another-cell-148984"},"fullPath":"/article/technology/software/microsoft-products/excel/highlight-excel-cells-based-on-the-value-of-another-cell-148984/","meta":{"routeType":"article","breadcrumbInfo":{"suffix":"Articles","baseRoute":"/category/articles"},"prerenderWithAsyncData":true},"from":{"name":null,"path":"/","hash":"","query":{},"params":{},"fullPath":"/","meta":{}}},"dropsState":{"submitEmailResponse":false,"status":"initial"},"sfmcState":{"newsletterSignupStatus":"initial"}}

In some cases, you may want to base the formatting rule for your Excel cells on how they compare to the value of another cell. Take the example illustrated here. The cells are conditionally highlighted if their respective values fall below the Prior Year Average shown in cell B3.

To build this basic formatting rule, follow these steps:

  1. Select the data cells in your target range (cells E3:C14 in this example), click the Home tab of the Excel Ribbon, and then select Conditional Formatting→New Rule.

    This opens the New Formatting Rule dialog box.

  2. In the list box at the top of the dialog box, click the Use a Formula to Determine which Cells to Format option.

    This selection evaluates values based on a formula you specify. If a particular value evaluates to TRUE, the conditional formatting is applied to that cell.

  3. In the formula input box, enter the formula shown with this step.

    Note that you are simply comparing your target cell (E3) with the value in the comparison cell ($B$3). As with standard formulas, you need to ensure that you use absolute references so that each value in your range is compared to the appropriate comparison cell.

    =E3<$B$3

    Note that in the formula, you exclude the absolute reference dollar symbols ($) for the target cell (E3). If you click cell E3 instead of typing the cell reference, Excel automatically makes your cell reference absolute. It’s important that you don’t include the absolute reference dollar symbols in your target cell because you need Excel to apply this formatting rule based on each cell’s own value.

  4. Click the Format button.

    This opens the Format Cells dialog box, where you have a full set of options for formatting the font, border, and fill for your target cell. After you have completed choosing your formatting options, click the OK button to confirm your changes and return to the New Formatting Rule dialog box.

  5. Back in the New Formatting Rule dialog box, click the OK button to confirm your formatting rule.

    If you need to edit your conditional formatting rule, simply place your cursor in any of the data cells within your formatted range and then go to the Home tab and select Conditional Formatting→Manage Rules. This opens the Conditional Formatting Rules Manager dialog box. Click the rule you want to edit and then click the Edit Rule button.

Curious to learn more? Take a look at these additional tips for working with Excel formulas.

Neuester Beitrag

Stichworte