Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have 13 input boxes in J10:J22. Within Data Validation I test to
ensure that inputs into these cells are between 1-9999. How can I test that no input in J10:J22 is duplicated? I assume I have to do this via code, how would I do that? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Select cells J10:J22
Goto DV Change the Allow type to Custom Add this formula =AND(J10=1,J10<1000,COUNTIF($J$10:J10,J10)=1) -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Sean" wrote in message ups.com... I have 13 input boxes in J10:J22. Within Data Validation I test to ensure that inputs into these cells are between 1-9999. How can I test that no input in J10:J22 is duplicated? I assume I have to do this via code, how would I do that? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob, where does it reference cells J11:J22 within this formula?
|
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sean,
It is automatically adjusted by Excel because you start by selecting J10:J22. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Sean" wrote in message ups.com... Bob, where does it reference cells J11:J22 within this formula? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob
Very clever, thanks. One other tweak, how could I allow a max of only 6 digits, within the same restrictions as above. So user could enter 1 or 123456 provided these weren't also entered first in J10:J22? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, I am not quite clear on that one.
Is the 1 or 123456 in J10:J22 or in some other cell that checks that that number hasn't already been used in J10:J22? If the latter, use a formula in this new cell (let's say L10) of =AND(L10=1,L10<=999999,NOT(ISNUMBER(MATCH(L10,$J$ 10:$J$22,0)))) -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Sean" wrote in message ups.com... Bob Very clever, thanks. One other tweak, how could I allow a max of only 6 digits, within the same restrictions as above. So user could enter 1 or 123456 provided these weren't also entered first in J10:J22? |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob
Very clever, thanks. One other tweak, how could I allow a max of only 6 digits, within the same restrictions as above. So user could enter 1 or 123456 provided these weren't also entered first in J10:J22? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel formula to test a value BETWEEN 2 values? | Excel Discussion (Misc queries) | |||
Test if a value is in a range of values | Excel Worksheet Functions | |||
Return 1st, 2nd, 3rd largest test values | Excel Worksheet Functions | |||
Test if a number falls between 2 values | Excel Worksheet Functions | |||
best way to test a row for 0 values | Excel Programming |