ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Functions and Formats (https://www.excelbanter.com/excel-worksheet-functions/96360-functions-formats.html)

coa01gsb

Functions and Formats
 

Hello All,

Could do with a hand. I have a formula in a cell that adds the length
of strings in other cells (=LEN(B2)+LEN(B3)+LEN(B4).....). I want to
ensure that this cell is always 6 characters long, padded with zero's
from the left. For example if total length of other cell values is 9 I
want my cell to read 000009, but if it's 999, I want my cell to read
000999.

Hope that's explained well enough, is there a simple solution?


--
coa01gsb
------------------------------------------------------------------------
coa01gsb's Profile: http://www.excelforum.com/member.php...o&userid=31214
View this thread: http://www.excelforum.com/showthread...hreadid=556120


CLR

Functions and Formats
 
=TEXT(LEN(B2)+LEN(B3)+LEN(B4),"000000")

Vaya con Dios,
Chuck, CABGx3



"coa01gsb" wrote:


Hello All,

Could do with a hand. I have a formula in a cell that adds the length
of strings in other cells (=LEN(B2)+LEN(B3)+LEN(B4).....). I want to
ensure that this cell is always 6 characters long, padded with zero's
from the left. For example if total length of other cell values is 9 I
want my cell to read 000009, but if it's 999, I want my cell to read
000999.

Hope that's explained well enough, is there a simple solution?


--
coa01gsb
------------------------------------------------------------------------
coa01gsb's Profile: http://www.excelforum.com/member.php...o&userid=31214
View this thread: http://www.excelforum.com/showthread...hreadid=556120



coa01gsb

Functions and Formats
 

Perfect, Thanks


--
coa01gsb
------------------------------------------------------------------------
coa01gsb's Profile: http://www.excelforum.com/member.php...o&userid=31214
View this thread: http://www.excelforum.com/showthread...hreadid=556120



All times are GMT +1. The time now is 10:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com