I want to limit errors on item ID entry to this exact alpha numeric format: AANANANNN The entry will always be 9 characters.
Example ID: WD5A4V336
I searched through the posts and found a problem similar to mine but don't quite understand the formula used and the formula is to long for data validation. The link to that post is below.
Limit Format in Cell to NAANNAA Format Using Data Validation in Excel?
[URL unfurl="true"]https://www.tek-tips.com/viewthread.cfm?qid=1757756[/url]
I wrote this formula but the first section (highlighted) does not work correctly. The rest works great.
=AND([highlight #FCE94F]NOT(ISNUMBER(VALUE(LEFT(B5,2))))[/highlight],ISNUMBER(VALUE(MID(B5,3,1))),NOT(ISNUMBER(VALUE(MID(B5,4,1)))),
ISNUMBER(VALUE(MID(B5,5,1))),NOT(ISNUMBER(VALUE(MID(B5,6,1)))),ISNUMBER(VALUE(RIGHT(B5,3))))
What is happening is, if both of the first two characters in the ID are numbers it will evaluate false. If either one of the first two characters in the ID are a number it will evaluate true when I need it to be false. And of course it evaluates true when the first two characters are letters. I think this is an easy one but I can't see it at the moment. Any help would be appreciated.
Thanks, renigar
Example ID: WD5A4V336
I searched through the posts and found a problem similar to mine but don't quite understand the formula used and the formula is to long for data validation. The link to that post is below.
Limit Format in Cell to NAANNAA Format Using Data Validation in Excel?
[URL unfurl="true"]https://www.tek-tips.com/viewthread.cfm?qid=1757756[/url]
I wrote this formula but the first section (highlighted) does not work correctly. The rest works great.
=AND([highlight #FCE94F]NOT(ISNUMBER(VALUE(LEFT(B5,2))))[/highlight],ISNUMBER(VALUE(MID(B5,3,1))),NOT(ISNUMBER(VALUE(MID(B5,4,1)))),
ISNUMBER(VALUE(MID(B5,5,1))),NOT(ISNUMBER(VALUE(MID(B5,6,1)))),ISNUMBER(VALUE(RIGHT(B5,3))))
What is happening is, if both of the first two characters in the ID are numbers it will evaluate false. If either one of the first two characters in the ID are a number it will evaluate true when I need it to be false. And of course it evaluates true when the first two characters are letters. I think this is an easy one but I can't see it at the moment. Any help would be appreciated.
Thanks, renigar