Text Formulas – REPT() & LEN() for Adding Leading Zeroes Before Incomplete Cheque Nos.

Advanced Excel Crash Course Section 12: Data Cleaning
4 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$99.99
List Price:  $139.99
You save:  $40
€96.21
List Price:  €134.70
You save:  €38.49
£79.77
List Price:  £111.68
You save:  £31.91
CA$143.95
List Price:  CA$201.54
You save:  CA$57.58
A$160.33
List Price:  A$224.47
You save:  A$64.14
S$135.93
List Price:  S$190.31
You save:  S$54.37
HK$776.63
List Price:  HK$1,087.32
You save:  HK$310.68
CHF 90.06
List Price:  CHF 126.09
You save:  CHF 36.02
NOK kr1,139.30
List Price:  NOK kr1,595.07
You save:  NOK kr455.76
DKK kr717.87
List Price:  DKK kr1,005.05
You save:  DKK kr287.17
NZ$177.29
List Price:  NZ$248.21
You save:  NZ$70.92
د.إ367.26
List Price:  د.إ514.17
You save:  د.إ146.91
৳11,945.58
List Price:  ৳16,724.30
You save:  ৳4,778.71
₹8,518.63
List Price:  ₹11,926.43
You save:  ₹3,407.79
RM448.65
List Price:  RM628.13
You save:  RM179.48
₦154,771.52
List Price:  ₦216,686.32
You save:  ₦61,914.80
₨27,852.21
List Price:  ₨38,994.21
You save:  ₨11,141.99
฿3,415.60
List Price:  ฿4,781.97
You save:  ฿1,366.37
₺3,525.07
List Price:  ₺4,935.24
You save:  ₺1,410.17
B$620.23
List Price:  B$868.35
You save:  B$248.12
R1,852.48
List Price:  R2,593.54
You save:  R741.06
Лв188.12
List Price:  Лв263.38
You save:  Лв75.25
₩146,004.73
List Price:  ₩204,412.46
You save:  ₩58,407.73
₪366.53
List Price:  ₪513.16
You save:  ₪146.62
₱5,844.26
List Price:  ₱8,182.20
You save:  ₱2,337.93
¥15,707.80
List Price:  ¥21,991.55
You save:  ¥6,283.75
MX$2,012.91
List Price:  MX$2,818.16
You save:  MX$805.24
QR364.43
List Price:  QR510.22
You save:  QR145.78
P1,382.66
List Price:  P1,935.78
You save:  P553.12
KSh12,923.70
List Price:  KSh18,093.70
You save:  KSh5,170
E£5,089.49
List Price:  E£7,125.49
You save:  E£2,036
ብር12,725.10
List Price:  ብር17,815.66
You save:  ብር5,090.55
Kz91,190.88
List Price:  Kz127,670.88
You save:  Kz36,480
CLP$99,038.09
List Price:  CLP$138,657.29
You save:  CLP$39,619.20
CN¥729.75
List Price:  CN¥1,021.68
You save:  CN¥291.93
RD$6,065.06
List Price:  RD$8,491.33
You save:  RD$2,426.27
DA13,522.10
List Price:  DA18,931.49
You save:  DA5,409.38
FJ$232
List Price:  FJ$324.81
You save:  FJ$92.81
Q770.19
List Price:  Q1,078.30
You save:  Q308.10
GY$20,913.42
List Price:  GY$29,279.63
You save:  GY$8,366.20
ISK kr13,961.60
List Price:  ISK kr19,546.80
You save:  ISK kr5,585.20
DH1,005.73
List Price:  DH1,408.06
You save:  DH402.33
L1,844.84
List Price:  L2,582.85
You save:  L738.01
ден5,920.21
List Price:  ден8,288.54
You save:  ден2,368.32
MOP$800
List Price:  MOP$1,120.03
You save:  MOP$320.03
N$1,842.15
List Price:  N$2,579.09
You save:  N$736.93
C$3,678.44
List Price:  C$5,149.97
You save:  C$1,471.52
रु13,621.60
List Price:  रु19,070.79
You save:  रु5,449.18
S/372.86
List Price:  S/522.02
You save:  S/149.15
K405.52
List Price:  K567.74
You save:  K162.22
SAR375.60
List Price:  SAR525.86
You save:  SAR150.25
ZK2,766.47
List Price:  ZK3,873.18
You save:  ZK1,106.70
L478.77
List Price:  L670.30
You save:  L191.52
Kč2,420.15
List Price:  Kč3,388.31
You save:  Kč968.16
Ft39,675.18
List Price:  Ft55,546.85
You save:  Ft15,871.66
SEK kr1,106.30
List Price:  SEK kr1,548.87
You save:  SEK kr442.56
ARS$102,565.23
List Price:  ARS$143,595.42
You save:  ARS$41,030.19
Bs692.24
List Price:  Bs969.16
You save:  Bs276.92
COP$438,826.54
List Price:  COP$614,374.71
You save:  COP$175,548.17
₡50,760.09
List Price:  ₡71,066.16
You save:  ₡20,306.06
L2,539.15
List Price:  L3,554.92
You save:  L1,015.76
₲780,390.60
List Price:  ₲1,092,578.06
You save:  ₲312,187.46
$U4,451.49
List Price:  $U6,232.27
You save:  $U1,780.77
zł411.19
List Price:  zł575.68
You save:  zł164.49
Already have an account? Log In

Transcript

Hello everyone. This time we will talk about a challenge question which generally people in accounting department faces and often auditors come across this particular problem too. For example, in column B, I have certain check numbers which has been entered by certain staff members. Now, why do I see numbers of varying lengths? Well, mostly the check number is of six digits in length. Now, when they write the zeros zeros, the zeros, which are previous to the numbers, and the press enter in Excel, the zeros go away.

Now, if the data has been retained in such a manner, and eventually you want to apply v lookup to be able to reconcile the balances using check numbers, you would want to add the zeros such that the length is six. And eventually the match takes place so that you can pull numbers using v lookup index etc. Now, the question is, if you are given the data in column A and you have to convert that in column B How do you proceed? If you do it manually? single quotation, double zero, double zero, and then writing 32. Imagine the kind of effort that will be required to do that task.

Well, I'll give you a better technique. If you want physical zeros to be added to the data. First, you need to find out how many zero needs to be added in the first place. Do I need to add a zero in the first check number? No, because it's in total six in length. How many zeros in the next cell?

Well, you need to add two zeros. Now how do I get that information? Well, I'll be using Len formula, length of the total number of characters. And that is going to give me what six in this case and in few cases four, two and three, and so on. And from this formula, what I'm going to add is six minus length. Why?

Because total number of digit is six minus the existing length of characters. So on occasion, you'll get zero Which means no zero needs to be added. And on occasion you will get three which means there are three zeros that needs to be added to this data. Now this is step one, step two, we will use this particular formula as a portion of the reputation formula. So what I'm going to do is I'm temporarily cut this portion of the formula so that it gets on the clipboard. As amendment I require it, I can bring it back.

So now I am proceed with our EBT DPT. Okay, what do you want to repeat? I want to repeat zero. I'm putting that in double quotation. Okay, now it asks me how many times do you want to add the zeros. Now this is tricky.

I cannot write a manual five or manual one or minus zero. I'll have to use that formula is still present on the clipboard. Ctrl V. And I closed one more parenthesis, enter. At this moment, I'm not getting any value. Why? Because there are no zeros needed.

But for the remaining notice been able to repeat the number of zeros that were required in the first place. So the last and final aspect of this trick is, whatever number of zeros you were able to populate using RDP D, you are going to concatenate using the ampersand sign with the original data. And if I do that, it gets combined, so nothing combined with the number and double zero combined with the digit. So there you go. This combo formula will help you add those physical zeros and ones having done so you can very well say copy and then paste special and value. Yeah, there you go.

Number students txt along with the physical zeros. Although let me quickly share one more trick which although not applicable for formula, basic sizes, but it's good enough for printing and display values. If I choose the data, right click, and I go to Format Cells. In the Format Cells as it opens up, I go to custom and in the Type II know those rows zeros Six times zero si press OK, boom, I get the zeros displayed in column B itself. But mind you, this was just a fake zero. As you double click, it still will show you the four digits, not the two zeros.

So if you want to use only for printing purpose and display purpose, use the technique of right click Format Cells. If not, then please go ahead with the combination of formulas that we had used to populate that field as prefix.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.