{"id":9121,"date":"2021-11-30T23:17:15","date_gmt":"2021-11-30T23:17:15","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=9121"},"modified":"2021-11-30T23:17:42","modified_gmt":"2021-11-30T23:17:42","slug":"solved-cell-colour-based-on-age-of-person","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/office\/cell-colour-based-on-age-of-person\/20983.html","title":{"rendered":"Solved Cell Colour Based On Age Of Person"},"content":{"rendered":"<p>Hello,<\/p>\n<p>I&#8217;m quite new to using formulas in excel. I&#8217;m working with a spreadsheet that has already been made but appears to not be working correctly now.<\/p>\n<p>I have a list of employees details that has their name then their DOB and next to that a cell which calculates their current age with a formula based on their DOB (this is the formula<br \/>\n=DATEDIF(D2, TODAY(),&#8221;Y&#8221;) &amp; &#8221; Years, &#8221; &amp; DATEDIF(D2, TODAY(),&#8221;YM&#8221;) &amp; &#8221; Months and &#8221; &amp; DATEDIF(D2, TODAY(),&#8221;MD&#8221;) &amp; &#8221; Days &#8220;)<\/p>\n<p>What I can&#8217;t figure out how to do is how to get that cell with the formula for their age to show a different colour based on their age. Specifically I want different colours for 18 years old, 19 years old and a colour for anyone over 20 years old.<\/p>\n<p>I know it has something to do with conditional formatting but for the life of me, cannot figure out how to make it work with ages instead of just a normal number.<\/p>\n<p>I&#8217;ve attached a photo of what I have in my spread sheet in case I did not explain myself clearly.<br \/>\n<a href=\"https:\/\/web.archive.org\/web\/20201124120702\/http:\/\/imgur.com\/a\/17CPR\" target=\"_blank\" rel=\"nofollow noopener\">http:\/\/imgur.com\/a\/17CPR<\/a><\/p>\n<p>Thank you so much for any help you can offer!!<\/p>\n<p align=\"right\"><span style=\"font-size: xx-small;\"><i>message edited by bruce0000<\/i><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":0},"question-category":[53],"question_tags":[],"class_list":["post-9121","question","type-question","status-publish","hentry","question-category-office"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/9121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=9121"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=9121"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=9121"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=9121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}