Conditional format

Solved/Closed
Report
Posts
2
Registration date
Wednesday May 22, 2013
Status
Member
Last seen
May 27, 2013
-
 boon1d -
Dear reader,

I was wondering if there is a possibility to specify the number of charakters in a conditional format in Excel.
Example. NL08569638 I want to have conditional format to control if there are (2 letters) and (8 figures)

Is that a possibility?

kind regards

1 reply

Posts
2829
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
November 22, 2021
490
Hi Boon1d,

I think I covered all bases with this formula but do test it out for yourself by changing the cell content:

=IF(AND(IF(ISERROR(LEFT(A1,2)*2),TRUE,FALSE)=TRUE,IF(ISERROR(RIGHT(LEFT(A1,2),1)*2),TRUE,FALSE)=TRUE,IF(ISERROR(RIGHT(A1,8)*2),FALSE,TRUE)=TRUE,IF(LEN(A1)=10,TRUE,FALSE)=TRUE),TRUE,FALSE)

Best regards,
Trowa
1
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2821 users have said thank you to us this month

Dear Trowa,

many thanks for the help, it helped a lot!

kind regards,
Boon