PC Review


Reply
Thread Tools Rate Thread

custom data validation on cells with data validation values

 
 
AKrobbins
Guest
Posts: n/a
 
      21st Jun 2011
I am trying to write a custom data validation for cells with data
validation values: The cell content in column A is restricted to
values 1 and 2. The cell content in Column B is restricted to values
1, 2, 3, 4, 98, or 97. Value 97 in column B is only suppose to be used
when the value in Column A is 2, so I would like to have a warning
sign when a value other than 97 is entered in Column B when the value
in Column A is 2. I input this formula in the data validation custom
field: =AND(A1=2,B2<>97) and tested it by entering 2 in column A and
4 in Column B and no warning message appeared. Is there another
formula that should be used when attempting a custom data validation
on cells with data validation values.

Thank you,

Athena
 
Reply With Quote
 
 
 
 
AKrobbins
Guest
Posts: n/a
 
      21st Jun 2011
On Jun 21, 10:49*am, AKrobbins <athenakrobb...@gmail.com> wrote:
> I am trying to write a custom data validation for cells with data
> validation values: The cell content in column A is restricted to
> values 1 and 2. The cell content in Column B is restricted to values
> 1, 2, 3, 4, 98, or 97. Value 97 in column B is only suppose to be used
> when the value in Column A is 2, so I would like to have a warning
> sign when a value other than 97 is entered in Column B when the value
> in Column A is 2. I input this formula in the data validation custom
> field: *=AND(A1=2,B2<>97) and tested it by entering 2 in column A and
> 4 in Column B and no warning message appeared. Is there another
> formula that should be used when attempting a custom data validation
> on cells with data validation values.
>
> Thank you,
>
> Athena


I meant to note the cells are noncontiguous, the data in column B is
in column C (my apologies).
 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      21st Jun 2011
Look at your logic at little closer and you will see why you do not get any
error message.

You have allowed B2 to be anything but 97 if A1 is 2

=AND(A1=2,B2=97) is what you want.


Gord Dibben MS Excel MVP

On Tue, 21 Jun 2011 07:49:03 -0700 (PDT), AKrobbins <(E-Mail Removed)>
wrote:

>I am trying to write a custom data validation for cells with data
>validation values: The cell content in column A is restricted to
>values 1 and 2. The cell content in Column B is restricted to values
>1, 2, 3, 4, 98, or 97. Value 97 in column B is only suppose to be used
>when the value in Column A is 2, so I would like to have a warning
>sign when a value other than 97 is entered in Column B when the value
>in Column A is 2. I input this formula in the data validation custom
>field: =AND(A1=2,B2<>97) and tested it by entering 2 in column A and
>4 in Column B and no warning message appeared. Is there another
>formula that should be used when attempting a custom data validation
>on cells with data validation values.
>
>Thank you,
>
>Athena

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Validation On A Cells With Data From A Different Spreadsheet Nat Govender Microsoft Excel Misc 6 9th Dec 2008 05:23 PM
Data validation: using Custom, NOT List, to get non-blank cells =?Utf-8?B?VGV0c3V5YSBPZ3VtYQ==?= Microsoft Excel Programming 2 15th Dec 2004 09:47 AM
Data validation referencing other cells' values JNorris Microsoft Excel Programming 1 11th May 2004 03:46 AM
How to use data validation - Custom validation 0-0 Wai Wai ^-^ Microsoft Excel Discussion 1 7th May 2004 09:04 PM
When pasting data into a column with data validation I lose validation check Brad Microsoft Excel Misc 5 17th Apr 2004 01:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:57 AM.