Pinterest Pixel

In-Cell Bar Charts with the REPT Function

John Michaloudis
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.

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 argument: number_times

So it enters the vertical bar character by the amount of times of the value cell, looking something like this:

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Here is how it is done in just a few steps:

In-Cell Bar Charts with the REPT Function | MyExcelOnline
Download excel workbookREPT-Function-Column-Chart.xlsx

STEP 1: Enter the REPT function in a column next to your values

=REPT(text,number_times)

STEP 2: Enter the vertical bar keyboard character in the first argument =REPT(“|”)

In-Cell Bar Charts with the REPT Function

STEP 3: Reference the value cell for the second argument =REPT(“|”a1)

STEP 4: Highlight the formula column and insert the Stencil font from the Home menu and choose a font color

STEP 5: If your value cells are high, the bar will go out of your screen.  To fix this, you need to enter a divisor in the second argument of your formula which will reduce the length eg =REPT(“|”,a1/5)

In-Cell Bar Charts with the REPT Function

 

If you like this Excel tip, please share it


Founder & Chief Inspirational Officer

at

John Michaloudis is a former accountant and finance analyst at General Electric, a Microsoft MVP since 2020, an Amazon #1 bestselling author of 4 Microsoft Excel books and teacher of Microsoft Excel & Office over at his flagship MyExcelOnline Academy Online Course.

See also  5 Best Ways to Split String in Excel (Free Examples)

Star 30 Days - Full Access Star

One Dollar Trial

$1 Trial for 30 days!

Access for $1

Cancel Anytime

One Dollar Trial
  • Get FULL ACCESS to all our Excel & Office courses, bonuses, and support for just USD $1 today! Enjoy 30 days of learning and expert help.
  • You can CANCEL ANYTIME — no strings attached! Even if it’s on day 29, you won’t be charged again.
  • You'll get to keep all our downloadable Excel E-Books, Workbooks, Templates, and Cheat Sheets - yours to enjoy FOREVER!
  • Practice Workbooks
  • Certificates of Completion
  • 5 Amazing Bonuses
Satisfaction Guaranteed
Accepted paymend methods
Secure checkout

Get Video Training

Advance your Microsoft Excel & Office Skills with the MyExcelOnline Academy!

Dramatically Reduce Repetition, Stress, and Overtime!
Exponentially Increase Your Chances of a Promotion, Pay Raise or New Job!

Learn in as little as 5 minutes a day or on your schedule.

Learn More!

Share to...