PC Review


Reply
Thread Tools Rate Thread

Checking Column Constraints

 
 
SHAWTY721
Guest
Posts: n/a
 
      19th Dec 2007
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 With Quote
 
 
 
 
sacrame
Guest
Posts: n/a
 
      19th Dec 2007
=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.

 
Reply With Quote
 
Jean-Yves
Guest
Posts: n/a
 
      19th Dec 2007
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" <(E-Mail Removed)> wrote in message
news:96548C8C-A0FB-41F9-910F-(E-Mail Removed)...
>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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking a string for two constraints Brian Cook Microsoft C# .NET 7 3rd Dec 2007 10:58 PM
Column/Page constraints in Access 2003 repost =?Utf-8?B?R2luYVN0YXI=?= Microsoft Access Reports 0 12th Sep 2005 02:31 AM
Checking FK constraints in advance from the client? Matt C. Microsoft ADO .NET 4 13th Aug 2004 03:14 PM
Table constraints and column names - C# =?Utf-8?B?SnVsaWFu?= Microsoft ADO .NET 1 28th Jan 2004 08:08 AM
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. Luther Miller Microsoft ADO .NET 2 3rd Oct 2003 09:57 PM


Features
 

Advertising
 

Newsgroups
 


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