Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 253
Default 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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking Column Entries gtb Excel Worksheet Functions 9 November 3rd 08 06:10 AM
Checking a column of values against another one BRob Charts and Charting in Excel 1 May 1st 08 09:18 AM
checking if a column is hidden John Excel Programming 3 June 12th 07 08:39 AM
checking celll in column withblue New Users to Excel 3 May 26th 05 08:39 PM
checking value in column sals Excel Programming 1 December 18th 03 08:01 PM


All times are GMT +1. The time now is 04:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"