ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Checking Column Constraints (https://www.excelbanter.com/excel-programming/402991-checking-column-constraints.html)

SHAWTY721

Checking Column Constraints
 
I am trying to figure out a way to check to see if the cells in a column have
6 characters and if it doesn't is there a way I can have zeroes inserted for
the cells that don't contain 6 characters in the designated column.

sacrame

Checking Column Constraints
 
=if(len(cellref)=6,len(cellref),0)

By the above, if the length of word/number in the cell is '6' it would
return the length which itself is '6' and if its not it would return '0'.
cellref is cell reference example 'a1'.

"SHAWTY721" wrote:

I am trying to figure out a way to check to see if the cells in a column have
6 characters and if it doesn't is there a way I can have zeroes inserted for
the cells that don't contain 6 characters in the designated column.


Jean-Yves[_2_]

Checking Column Constraints
 
Hi,

Cell Format as "000000"
Or in another column : =LEFT("000000"; 6-LEN(A1) ) & A1
Or =IF(LEN(A3)=6;"";
LEFT("000000"; 6-LEN(A3) ) & A3)
Regards
JY

"SHAWTY721" wrote in message
...
I am trying to figure out a way to check to see if the cells in a column
have
6 characters and if it doesn't is there a way I can have zeroes inserted
for
the cells that don't contain 6 characters in the designated column.





All times are GMT +1. The time now is 07:09 AM.

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