SaraWitch
Active Member
- Joined
- Sep 29, 2015
- Messages
- 377
- Office Version
- 365
- Platform
- Windows
Hello peeps,
I have a formula to extract the first number from the previous cell and would like to add a "0" in formula if one hasn't been entered previously.
Any help would be appreciated
I have a formula to extract the first number from the previous cell and would like to add a "0" in formula if one hasn't been entered previously.
¦ MrExcel Queries.xlsm | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | Contact Number | Number | Text | ||
2 | 01111 111111 | 01111 11111 | |||
3 | 01111 111111 (sister's number) | 01111 11111 | (sister's number) | ||
4 | 1111111111 | 1111111111 | |||
Sheet3 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B2:B4 | B2 | =LEFT(A2,SUM(LEN(A2)-LEN(SUBSTITUTE(A2,{"0","1","2","3","4","5","6","7","8","9"},"")))) |
Any help would be appreciated