REPT() in excelREPT() is a function in excel that specifies repetition. It means that the function repeats the specified characters, symbols, numbers, etc., into the desired number of times. For example, Number = 2 Times = 3 Result = 222 Explanation: The Rept() function has first copied the number and inserted it the specified number of times. SyntaxIt is given by: Where, Text: It is specified that we want to repeat Number_times: It specifies the number of times the specified text is to be repeated. In excel, we declare the above function as: Output: abcabcabc Explanation: The text abc is repeated three times. Excel will return the value as abcabcabc. We can also specify cell numbers in the place of both the parameters of the REPT() function. Let's consider another two examples.
We must enclose it in double-quotes whenever we specify symbols or characters separately in the REPT() function. While displaying numbers, REPT() does not require double-quotes. Let cell B4 contain symbol &. To apply the REPT() function, we can specify it in two ways.
Output in both cases will be: &&&&& It means that if we specify the cell number in the function, excel will automatically consider it by default. RemarksConsider some important points, which are listed as follows:
ExamplesLet's consider some examples based on the Rept() function. Example 1: Repeating symbolsSolution: Consider the below steps:
Similarly, we can use any symbol. The REPT() function separately on each cell will work as: Example 2: Repeating charactersSolution: Consider the below steps:
Example 3: Creating a chart as per the given dataSolution: Consider the below steps:
The result clearly shows that country B has highest population and country D has lowest population. Next TopicWhat is Formatting in Excel |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India