View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
MRT MRT is offline
external usenet poster
 
Posts: 26
Default conditional formatting for wrongly entered 9 digit numbers

......OR(LENB(A1)<12,NOT..... :-)

--
MRT

"Rick Rothstein" wrote in message ...
Give this Conditional Formatting formula a try...

=AND(A1<"",OR(NOT(ISNUMBER(--SUBSTITUTE(A1,"-",""))),TEXT(SUBSTITUTE(A1,
"-", ""), "##-###-##-##") < A1))

--
Rick (MVP - Excel)


"andreashermle" wrote in message
...
Dear Experts:

I need to enter 9 digit numbers in column A. These item numbers have
got the following make-up:
##-###-##-##

I now would like to assign conditional formatting to the whole column
A with the following condition: As soon as the entered number does not
match the above syntax, the cell is to be filled red.

Is that possible?

Help is much appreciated. Thank you very much in advance.

Regards, Andreas