How to Create In-Cell Bar Chart with REPT Function in Excel

In-cell charts are awesome.

And today, I’ll show you how to create an in-cell bar chart with REPT function.

But, do they really worth your time?

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.



About the Author

Puneet Gogia

He is using Excel since his college days. He helped thousands of people to understand the power of the spreadsheets and learn Microsoft Excel. You can find him online, tweeting about Excel, on a running track, or sometimes hiking up a mountain.

LinkedIn - YouTube

Content Protection by DMCA.com

8 thoughts

Leave a Comment

Your email address will not be published.

  1. 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. 🙂

  2. 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.