Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Insert data with length between 11 OR 15 digits

Hi,

I want to create the formula than can calculate the Length of cell is 11 or
15 dig (in one formula only), and the blank cell (null) is doesn't count for.

I preffered the formula to be inserted ini Conditional Formula, and if
there's any cell that contain data not 11 or 15 dig, it's cell gonna have a
red background (ps. the blank cell also not to be count, cause I want to copy
to single coloumn)

If anyone could help me on this formula, before thank you first to you.

Thanx. Nico.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 695
Default Insert data with length between 11 OR 15 digits

insert in Conditional format and pick ur color

=IF(A1<"",AND(LEN(A1)<11,LEN(A1)<15))

This dont count spaces in text
=IF(A1<"",AND(LEN(SUBSTITUTE(A1," ",""))<11,LEN(SUBSTITUTE(A1," ",""))<15))


"Tan Nico" skrev:

Hi,

I want to create the formula than can calculate the Length of cell is 11 or
15 dig (in one formula only), and the blank cell (null) is doesn't count for.

I preffered the formula to be inserted ini Conditional Formula, and if
there's any cell that contain data not 11 or 15 dig, it's cell gonna have a
red background (ps. the blank cell also not to be count, cause I want to copy
to single coloumn)

If anyone could help me on this formula, before thank you first to you.

Thanx. Nico.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Insert data with length between 11 OR 15 digits

So, you want the cell fill color to be red if the cell is not empty and
contains anything other than a number between 11 and 15 digits long?

Is the number an integer? Might there be any leading 0's?

Try this:

Assume the cell in question is A1
Select cell A1
Goto FormatConditionalFormatting
Formula Is:

=OR(ISTEXT(A1),AND(ISNUMBER(A1),OR(LEN(A1)<11,LEN( A1)15)))

Click the Format button
Select the Patterns tab
Select a shade of RED
OK out

Biff

"Tan Nico" <Tan wrote in message
...
Hi,

I want to create the formula than can calculate the Length of cell is 11
or
15 dig (in one formula only), and the blank cell (null) is doesn't count
for.

I preffered the formula to be inserted ini Conditional Formula, and if
there's any cell that contain data not 11 or 15 dig, it's cell gonna have
a
red background (ps. the blank cell also not to be count, cause I want to
copy
to single coloumn)

If anyone could help me on this formula, before thank you first to you.

Thanx. Nico.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Insert data with length between 11 OR 15 digits

=IF(A1<"",AND(LEN(A1)<11,LEN(A1)<15))

That fails if the entry is text and is 11 or 15 characters in length.

Biff

"excelent" wrote in message
...
insert in Conditional format and pick ur color

=IF(A1<"",AND(LEN(A1)<11,LEN(A1)<15))

This dont count spaces in text
=IF(A1<"",AND(LEN(SUBSTITUTE(A1," ",""))<11,LEN(SUBSTITUTE(A1,"
",""))<15))


"Tan Nico" skrev:

Hi,

I want to create the formula than can calculate the Length of cell is 11
or
15 dig (in one formula only), and the blank cell (null) is doesn't count
for.

I preffered the formula to be inserted ini Conditional Formula, and if
there's any cell that contain data not 11 or 15 dig, it's cell gonna have
a
red background (ps. the blank cell also not to be count, cause I want to
copy
to single coloumn)

If anyone could help me on this formula, before thank you first to you.

Thanx. Nico.



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
character length in data forms phdbd Excel Discussion (Misc queries) 0 October 11th 06 06:15 PM
copy, insert and add digits Ronco Bill Excel Worksheet Functions 1 February 3rd 06 08:20 PM
Need insert a dash in between last 4 digits in text string Phil Excel Worksheet Functions 3 August 22nd 05 10:48 PM
Graph with variable data length snoach Excel Discussion (Misc queries) 1 May 27th 05 10:15 AM
length of character data Saravanan Excel Discussion (Misc queries) 2 December 19th 04 06:49 PM


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

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"