Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
xl 2007 how to validate that cell 1 invalid if cell 2 not blank declaire9 Excel Discussion (Misc queries) 0 April 13th 10 06:57 PM
Can I validate a cell only if a certain condition is met? Anita Excel Discussion (Misc queries) 2 July 11th 07 06:34 PM
Validate cell value against a list Hippy Excel Programming 2 December 7th 05 05:26 PM
HELP! cell validate No Name Excel Programming 2 September 29th 04 07:34 PM
Validate value in cell Mike[_40_] Excel Programming 0 August 4th 03 05:54 PM


All times are GMT +1. The time now is 06:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"