Saturday, February 11, 2012

How To Create Chart By Using REPT Formula In MS Excel (Excel Trick)

As everybody knows, excel has very good chart options to create excellent charts. But here we are not at all touching any of the Excel Chart option. I can create a simple bar chart by using REPT formula. This is one of the trick you can use while creating dashboards.

Since this chart we creating by using REPT formula, let me start to explain REPT formula as first part.

All About REPT Formula?

Syntex of the REPT formula

=REPT(text,number_times)



Here,
Text is the text you want to repeat
Number_times is a positive number specifying the number of times to repeat text


In simple terms, REPT repeats text a given number of times. We use REPT to fill a cell with a number of instances of a text string.


For Example, If we want to repeat alphabet 'S' as 10 times in a cell, then we have to use REPT formula as =REPT("S",10)


Then the result will be SSSSSSSSSS

How to create Chart with REPT function?

The below is the data which I am going to use to create a chart.


NameMarks
Saran75
Harsha21
Vishnu64
Maruthi42
Bhyrav90
Raja12

Then, use the below formula in C2.

=REPT("I",B2)

Copy and Paste the same formula till the data ends ie., C7 cell.

NameMarks
Saran75=REPT("I",F6)
Harsha21=REPT("I",F7)
Vishnu64=REPT("I",F8)
Maruthi42=REPT("I",F9)
Bhyrav90=REPT("I",F10)
Raja12=REPT("I",F11)

Then, it results as below.

NameMarks
Saran75IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
Harsha21IIIIIIIIIIIIIIIIIIIII
Vishnu64IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
Maruthi42IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
Bhyrav90IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
Raja12IIIIIIIIIIII
The above result is nothing but the simple chart. Isn't it?

In fact, the above chart bars are horizontal. If you want to create chart with vertical bars.. then, use Format option in Excel.





2 comments:

Share your comment here..