Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
validate a cell value
I need to determine if a cell value is contained within a valadation range
found in another sheet. I have been trying varous combinations of worksheet functions MATCH and ISNA, as well as VBA ISERROR function, but keep getting fatal errors when cell value is not found in the valadation range. -- Richard |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
validate a cell value
If you're trying to do this in VBA, one possibility is this:
Dim cl as Range 'Cell Dim str1 as String 'String to match Dim Found as Boolean str1 = Range("A1").Value 'Your cell For Each cl in Range(ValidationRange) 'Assumes "ValidationRange" is a valid named range If cl = str1 Then Found = True Next MsgBox Found HTH Die_Another_Day Richard wrote: I need to determine if a cell value is contained within a valadation range found in another sheet. I have been trying varous combinations of worksheet functions MATCH and ISNA, as well as VBA ISERROR function, but keep getting fatal errors when cell value is not found in the valadation range. -- Richard |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
validate a cell value
Need a little more info. Are you trying to validate that a cell being input
is contained within your validation list, or are you trying to validate that the values in an existing list all match the values in the validation range or... -- HTH... Jim Thomlinson "Richard" wrote: I need to determine if a cell value is contained within a valadation range found in another sheet. I have been trying varous combinations of worksheet functions MATCH and ISNA, as well as VBA ISERROR function, but keep getting fatal errors when cell value is not found in the valadation range. -- Richard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
xl 2007 how to validate that cell 1 invalid if cell 2 not blank | Excel Discussion (Misc queries) | |||
Can I validate a cell only if a certain condition is met? | Excel Discussion (Misc queries) | |||
Validate cell value against a list | Excel Programming | |||
HELP! cell validate | Excel Programming | |||
Validate value in cell | Excel Programming |