From the course: Excel Tips Weekly

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Use the LEN and REPT functions for specialized cell testing and display options

Use the LEN and REPT functions for specialized cell testing and display options - Microsoft Excel Tutorial

From the course: Excel Tips Weekly

Use the LEN and REPT functions for specialized cell testing and display options

- [Instructor] On this worksheet called ID assignment, 2 we're about to create some new ID's 3 based on existing ID's that are in column D. 4 We're going to precede them with zeros, 5 but as we do this, 6 we need to add a different number of zeros. 7 We want all these to be six digits, 8 so it means we'll have to add two zeros in some cases, 9 one zero in another, maybe even three in some cases. 10 We'll be using two separate functions 11 that usually have nothing to do with one another. 12 One's called Len, L-E-N, think of the word length. 13 The other is called REPT, think of the word repeat. 14 Now, an isolated use of the LEN function, I'm curious, 15 and we need this for signage reasons, 16 I need to know how many characters these are, 17 how wide they are, 18 how many characters does a cell have in it? 19 Sometimes you need to know that. 20 Equal LEN, this is out in column I right now. 21 LEN left parenthesis…

Contents