Solved

Excel Validation function

Posted on 2011-02-28
6
344 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
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now