S
salgud
I've been trying for 3 wks now to figure out a way to enter a validation
formula into the custom formula box that will both run, VBA wise, and
validate the data correctly. Basically, when I enter a name into cell, I
want it to check to see that the user entered an acceptable ID into another
cell (in the example, cell B7). The ID must be a letter followed by 6
numbers, e.g., A123456. I've made a couple of previous posts trying to get
this to work, but no one has come up with a working solution. I can't
understand why I'm having so much trouble.
I.e., the following forumla works great in a cell for testing the value:
=AND(LEN(B7)=7,NOT(ISNUMBER((LEFT(B7,1)*1))),ISNUMBER(RIGHT(B7,6)*1))
When I drop the = sign (why do some formulas require and = sign in the
custom validation box and others not?) and put it in the custom validation
formula box, it gives me a FALSE on a valid ID. Any ideas why? I've had the
same problem with other custom validation formulas, which makes me think
I'm missing something important in how they work and/or how to apply them.
I'm new to validation, though I've been doing VBA for a while. I'd
appreciate any help in getting this straigtened out.
formula into the custom formula box that will both run, VBA wise, and
validate the data correctly. Basically, when I enter a name into cell, I
want it to check to see that the user entered an acceptable ID into another
cell (in the example, cell B7). The ID must be a letter followed by 6
numbers, e.g., A123456. I've made a couple of previous posts trying to get
this to work, but no one has come up with a working solution. I can't
understand why I'm having so much trouble.
I.e., the following forumla works great in a cell for testing the value:
=AND(LEN(B7)=7,NOT(ISNUMBER((LEFT(B7,1)*1))),ISNUMBER(RIGHT(B7,6)*1))
When I drop the = sign (why do some formulas require and = sign in the
custom validation box and others not?) and put it in the custom validation
formula box, it gives me a FALSE on a valid ID. Any ideas why? I've had the
same problem with other custom validation formulas, which makes me think
I'm missing something important in how they work and/or how to apply them.
I'm new to validation, though I've been doing VBA for a while. I'd
appreciate any help in getting this straigtened out.