{"id":2044,"date":"2016-05-24T20:01:13","date_gmt":"2016-05-24T18:01:13","guid":{"rendered":"https:\/\/www.myexcelonline.com\/?p=2044"},"modified":"2024-02-06T15:58:28","modified_gmt":"2024-02-06T14:58:28","slug":"in-cell-bar-charts-with-the-excel-rept-function","status":"publish","type":"post","link":"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/in-cell-bar-charts-with-the-excel-rept-function\/","title":{"rendered":"In-Cell Bar Charts with the REPT Function"},"content":{"rendered":"<p>When you are creating an Excel Dashboard and are limited by space and do not want to insert a chart, you can easily create an in-cell bar chart using the REPT (repeat) function.<\/p>\n<p>The REPT function uses the <strong>vertical bar character | as the first argument:<\/strong> <span style=\"color: #0000ff;\"><em>text<\/em> <\/span>and <strong>references the value cell for the second argument:<\/strong> <em><span style=\"color: #ff0000;\">number_times<\/span><\/em><\/p>\n<p>So it\u00a0enters the vertical bar character by the amount of times of the value cell, looking something like this:<\/p>\n<p>||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||<\/p>\n<p>Here is how it is done in just a few steps:<br \/>\n<iframe src=\"https:\/\/www.youtube.com\/embed\/VG3PGXVf5sI?rel=0 \" width=\"800\" height=\"400\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><\/p>\n<p><a href=\"https:\/\/www.youtube.com\/c\/MyExcelOnlinecomtutorials?sub_confirmation=1\" target=\"_blank\" rel=\"noopener noreferrer nofollow\"><img loading=\"lazy\" decoding=\"async\" class=\"alignmiddle wp-image-111468 size-full\" style=\"vertical-align: middle;\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/04\/1.yt_.png\" alt=\"\" title=\"\"><\/a><br \/>\n<span style=\"text-decoration: underline; color: #0000ff;\"><a class=\"IRPP_minimalist icon-download\" style=\"color: #0000ff; text-decoration: underline;\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2015\/11\/REPT-Function-Column-Chart.xlsx\" target=\"_blank\"><span class=\"ctaText px-3 text-capitalize\">Download excel workbook<\/span><span class=\"postTitle px-3\">REPT-Function-Column-Chart.xlsx<\/span><\/a><\/span><\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 1:<\/strong><\/span> Enter the REPT function in a column next to your values<\/p>\n<p>=REPT(<span style=\"color: #0000ff;\">text<\/span>,<span style=\"color: #ff0000;\">number_times<\/span>)<\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 2:<\/strong> <\/span><strong>Enter the vertical bar<\/strong> keyboard character in the first argument\u00a0<span style=\"color: #000000;\"><strong>=REPT(<span style=\"color: #0000ff;\">&#8220;|&#8221;<\/span>)<\/strong><\/span><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2015\/11\/bzc3W.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"In-Cell Bar Charts with the REPT Function\"  class=\"alignnone size-full wp-image-2051\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2015\/11\/bzc3W.png\" alt=\"In-Cell Bar Charts with the REPT Function\" width=\"219\" height=\"267\" \/><\/a><\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 3:<\/strong><\/span> <strong>Reference the value cell<\/strong> for the second argument <strong><span style=\"color: #000000;\">=REPT(<\/span><span style=\"color: #0000ff;\">&#8220;|&#8221;<\/span>,\u00a0<span style=\"color: #ff0000;\">a1<\/span><span style=\"color: #000000;\">)<\/span><\/strong><\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 4:<\/strong> <\/span>Highlight the <a class=\"wpil_keyword_link\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/top-excel-formulas-function-examples-to-get-better-at-microsoft-excel\/\" target=\"_blank\" rel=\"noopener\" title=\"formula\" data-wpil-keyword-link=\"linked\">formula<\/a> column and<strong> insert the <em>Stencil<\/em> font<\/strong> from the Home menu and choose a font color<\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 5:<\/strong> <\/span>If your value cells are high, the bar will go out of your screen. \u00a0To fix this, you need to enter a divisor in the second argument of your formula which will reduce the length eg\u00a0<strong><span style=\"color: #000000;\">=REPT(<\/span><span style=\"color: #0000ff;\">&#8220;|&#8221;<\/span>,<span style=\"color: #ff0000;\">a1\/5<\/span><span style=\"color: #000000;\">)<\/span><\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2015\/11\/2015-11-26_19-57-58.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" title=\"In-Cell Bar Charts with the REPT Function\"  class=\"alignnone size-full wp-image-2052\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2015\/11\/2015-11-26_19-57-58.png\" alt=\"In-Cell Bar Charts with the REPT Function\" width=\"471\" height=\"301\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2015\/11\/2015-11-26_19-57-58.png 471w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2015\/11\/2015-11-26_19-57-58-300x192.png 300w\" sizes=\"(max-width: 471px) 100vw, 471px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you are creating an Excel Dashboard and are limited by space and do not want to insert a chart, you can easily create an in-cell bar chart using the REPT (repeat) function. The REPT function uses the vertical bar character | as the first argument: text and references the value cell for the second [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":17164,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cos_headline_score":0,"cos_seo_score":0,"cos_headline_text":"","cos_headline_has_been_analyzed":false,"cos_last_analyzed_headline":[],"om_disable_all_campaigns":false},"categories":[5,3,28,14],"tags":[94,43],"acf":[],"_links":{"self":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/2044"}],"collection":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/comments?post=2044"}],"version-history":[{"count":0,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/2044\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media\/17164"}],"wp:attachment":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media?parent=2044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/categories?post=2044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/tags?post=2044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}