close

I want users to be allowed to enter a seven character response in a cell.
The seven character response must be in the following format - number number
letter letter number number number. I specified the length of the entry by
using the data validation feature but I don't know how to ensure that the
response is in the right format. I'm using Microsoft Excel 2002. Any
suggestions?

Hi!

Kind of ugly but it seems to work:

Select the cell(s) in question. I'll use A1 in this example

Goto Datagt;Validation
Allow: Custom
Formula:

=AND(LEN(A1)=7,ISNUMBER(--LEFT(A1,2)),ISNUMBER(MATCH(CODE(UPPER(MID(A1,3,1)) ),ROW(65:90),0)),ISNUMBER(MATCH(CODE(UPPER(MID(A1, 4,1))),ROW(65:90),0)),ISNUMBER(--RIGHT(A1,3)))

OK out

Biff

quot;Lauriequot; gt; wrote in message
...
gt;I want users to be allowed to enter a seven character response in a cell.
gt; The seven character response must be in the following format - number
gt; number
gt; letter letter number number number. I specified the length of the entry
gt; by
gt; using the data validation feature but I don't know how to ensure that the
gt; response is in the right format. I'm using Microsoft Excel 2002. Any
gt; suggestions?

全站熱搜
創作者介紹
創作者 software 的頭像
software

software

software 發表在 痞客邦 留言(0) 人氣()