Solved

Excel Validation function

Posted on 2011-02-28
6
381 Views
Last Modified: 2012-05-11
In my Example I have a list of items on a separate sheet.  I have a data validation rule that says the items must be selected from my list.  I want to be able to run a formula in my Excel sheet that lets me know if the data in the cell is valid.  I cannot use any VBA code to do this because I have a new requirement  to not use any macros in this worksheet.  

Here is the VBA function I had written.

Public Function ISVALID(ByVal Target As Range) As Boolean
    ISVALID = Target.Validation.Value
End Function

However, I need a way to do this using the current Excel formulas.  Any help would be appreciated.
0
Comment
Question by:busapps
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 5

Expert Comment

by:roger_karam
ID: 34998184
Do you have a sample sheet with what you are looking for? What is your validation rule?

-RK
0
 
LVL 6

Expert Comment

by:Eric Zwiekhorst
ID: 34998250
I do not understand the need for this check.

If you have as validation a list the value you enter can not be other then in this list.

if you use the dropdown it is always valid.
If you type you can't type anything else then in the list so it is valid to.
Only if you want to prevent a blank, and that is a easy check..



Kind regards


Eric
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 34998471
There is an option on the Data Validation menu to circle invalid data. No formulas or VBA required. :)
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 85

Expert Comment

by:Rory Archibald
ID: 34998497
PS It's on the Formula Auditing toolbar pre 2007.
0
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 500 total points
ID: 34998592
Use the MATCH function:

   =NOT(ISNA(MATCH(Target,ValidationList,0)))

Kevin
0
 
LVL 1

Author Closing Comment

by:busapps
ID: 35012123
I ended up using the following formula into conditional formatting:  

=AND(ISNA(MATCH(Target, DestinationList, 0)), LEN(Target)>0)

Thanks to all for the responses.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question