In Cell Bar Chart With REPT Function

how to create an bar chart with rept function

They are easy to create and simple to use.

Ahead, in this post, I’ll show a step by step process to create a decent bar chart with REPT function.

But Do You Know About REPT Function?

Syntax

REPT(text, number_times)

Steps to Create a Bar Chart With REPT Function

Here you have a mark sheet of students and you need to add a bar in the performance cell next to the marks column.

how to create an bar chart with rept function marks table

Here are the steps.

how to create an bar chart with rept function insert option buttons
  • Name both of the buttons “Only Percentage” & “Bars”. And, link then to a cell. (I have linked then to cell A1)
how to create an bar chart with rept function link option buttons
  • Now, come back to your data table and insert the following formula into the cell.

=IF(A$1=1,REPT(“|”,B3)&” “&TEXT(B3/100,”0%”),B3/100)

  • Make sure to change font style to “PlayBill”.
  • Now, drag the formula to the entire table and your bar chart is ready.
how to create an bar chart with rept function ready table

How this formula works

Sample File

Conclusion

By using this technique you can fire up your boring data.

If you compare both of the tables (with or without bars), you’ll notice that by using bars you can present your data in an understandable way.

Now tell me one thing.

Do you like this tip?

Share your view with me in the comment section, I’d love to hear from you. And, please don’t forget to share this tip with friends.



  • Dhananjay Jadhav

    I gone through the structure of the formula. I was unaware with rept function and also innovative & efficient use of radio button. This is extreamly helpful to interpret the huge data quickly and without burning much of your laptop RAM.
    Thanks Puneet Gupta for this excellent trick.

    • Puneet Gogia

      I’m so glad you liked it. 🙂

  • Aly June

    Thank you so much!

    • Puneet Gogia

      You’re welcome. 🙂

  • Raman Girdhar

    This is wonderful Puneet. Thanks a lot.
    One input – you have mentioned “Make sure to change font style to PlayBill”. This is fine with bars but it shrinks the percentages mentioned along with bars, making it difficult to read. Font “Britannic Bold” used in the Excel file is a better option removing this drawback. 🙂

    • Puneet Gogia

      Yes, you are absolutely right.