#1   Report Post  
Pat
 
Posts: n/a
Default Custom validation

The following custom validation is not correct, anyone know what is wrong
with it?

=if(K22 ="QS")=J98<=M98

Pat


  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Pat,

Seeing as you don't tell us what you want, we can only guess, but maybe

=if(OR(K22 ="QS",K22=J98,K22<=M98), do_something,do_something_else)


--
HTH

Bob Phillips

"Pat" wrote in message
...
The following custom validation is not correct, anyone know what is wrong
with it?

=if(K22 ="QS")=J98<=M98

Pat




  #3   Report Post  
Pat
 
Posts: n/a
Default

Hi Bob,
Sorry for the vagueness of my post.
Originally the custom validation had the following formula:

=J98<=M98

this prevented a greater value in J98 being entered than the value present
in M98

I now require modification when occasionally K22 contains the value 'QS'
I say occasionally because other values will be in K22 and this should not
effect the custom validation.

I have tried your suggestion and it was not accepted by the validation
window.

Regards
Pat

"Bob Phillips" wrote in message
...
Pat,

Seeing as you don't tell us what you want, we can only guess, but maybe

=if(OR(K22 ="QS",K22=J98,K22<=M98), do_something,do_something_else)


--
HTH

Bob Phillips

"Pat" wrote in message
...
The following custom validation is not correct, anyone know what is

wrong
with it?

=if(K22 ="QS")=J98<=M98

Pat






  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

Pat,

I was unclear whether by validation you meant DV or just a formula, it is
clear now you meant the former, which is why it didn't work with the IF in
it. Still not absolutely sure what the test is, but I think you want

if the J98<=M98 test only applies if K22="QS", then
=AND(K22="QS", J98<=M98)

if the J98<=M98 test only applies if K22 does not ="QS", then
=AND(K22<"QS", J98<=M98)

if either the J98<=M98 test applies or if K22 ="QS", then
=OR(K22="QS", J98<=M98)

Take your pick.

--
HTH

Bob Phillips

"Pat" wrote in message
...
Hi Bob,
Sorry for the vagueness of my post.
Originally the custom validation had the following formula:

=J98<=M98

this prevented a greater value in J98 being entered than the value present
in M98

I now require modification when occasionally K22 contains the value 'QS'
I say occasionally because other values will be in K22 and this should not
effect the custom validation.

I have tried your suggestion and it was not accepted by the validation
window.

Regards
Pat

"Bob Phillips" wrote in message
...
Pat,

Seeing as you don't tell us what you want, we can only guess, but maybe

=if(OR(K22 ="QS",K22=J98,K22<=M98), do_something,do_something_else)


--
HTH

Bob Phillips

"Pat" wrote in message
...
The following custom validation is not correct, anyone know what is

wrong
with it?

=if(K22 ="QS")=J98<=M98

Pat








  #5   Report Post  
Pat
 
Posts: n/a
Default

if the J98<=M98 test only applies if K22="QS", then
=AND(K22="QS", J98<=M98)


The first formula does not allow a user to enter any value if K22 contains
anything other than "QS"

if the J98<=M98 test only applies if K22 does not ="QS", then
=AND(K22<"QS", J98<=M98)


The second, does not allow greater than the value on M98 if K22 contains
anything other than "QS" Its important that any value greater than M98 can
be entered if K22 does not contain "QS" Also, when K22 does contain the
value "QS" no data is allowed to be entered. Its necessary that data is
allowed to be entered if K22 contains "QS"

if either the J98<=M98 test applies or if K22 ="QS", then
=OR(K22="QS", J98<=M98)


The third, allows a value greater than the value in M98 if K22 contains
"QS", but does not allow a value greater than M98 if K22 contains anything
other than "QS"

The third option seems to be close to what I am looking for, only it needs
to be the opposite way round. I have tried to see what happens when the
formula is changed, only it gives the same result.
=OR(J98<=M98,K22="QS" )

Pat



"Bob Phillips" wrote in message
...
Pat,

I was unclear whether by validation you meant DV or just a formula, it is
clear now you meant the former, which is why it didn't work with the IF in
it. Still not absolutely sure what the test is, but I think you want

if the J98<=M98 test only applies if K22="QS", then
=AND(K22="QS", J98<=M98)

if the J98<=M98 test only applies if K22 does not ="QS", then
=AND(K22<"QS", J98<=M98)

if either the J98<=M98 test applies or if K22 ="QS", then
=OR(K22="QS", J98<=M98)

Take your pick.

--
HTH

Bob Phillips

"Pat" wrote in message
...
Hi Bob,
Sorry for the vagueness of my post.
Originally the custom validation had the following formula:

=J98<=M98

this prevented a greater value in J98 being entered than the value
present
in M98

I now require modification when occasionally K22 contains the value 'QS'
I say occasionally because other values will be in K22 and this should
not
effect the custom validation.

I have tried your suggestion and it was not accepted by the validation
window.

Regards
Pat

"Bob Phillips" wrote in message
...
Pat,

Seeing as you don't tell us what you want, we can only guess, but maybe

=if(OR(K22 ="QS",K22=J98,K22<=M98), do_something,do_something_else)


--
HTH

Bob Phillips

"Pat" wrote in message
...
The following custom validation is not correct, anyone know what is

wrong
with it?

=if(K22 ="QS")=J98<=M98

Pat












  #6   Report Post  
Bob Phillips
 
Posts: n/a
Default

are we talking

=OR(AND(K22<"QS", J98<=M98),AND(K22="QS", J98M98))

or

=OR(AND(K22="QS", J98<=M98),AND(K22<"QS", J98M98))

or

=OR(AND(K22<"QS", J98M98),AND(K22="QS", J98<=M98))

or do I give up?

Which cell is this going in, J98 or M98, and how about laying out a decision
table?

--
HTH

Bob Phillips

"Pat" wrote in message
...
if the J98<=M98 test only applies if K22="QS", then
=AND(K22="QS", J98<=M98)


The first formula does not allow a user to enter any value if K22 contains
anything other than "QS"

if the J98<=M98 test only applies if K22 does not ="QS", then
=AND(K22<"QS", J98<=M98)


The second, does not allow greater than the value on M98 if K22 contains
anything other than "QS" Its important that any value greater than M98 can
be entered if K22 does not contain "QS" Also, when K22 does contain the
value "QS" no data is allowed to be entered. Its necessary that data is
allowed to be entered if K22 contains "QS"

if either the J98<=M98 test applies or if K22 ="QS", then
=OR(K22="QS", J98<=M98)


The third, allows a value greater than the value in M98 if K22 contains
"QS", but does not allow a value greater than M98 if K22 contains anything
other than "QS"

The third option seems to be close to what I am looking for, only it needs
to be the opposite way round. I have tried to see what happens when the
formula is changed, only it gives the same result.
=OR(J98<=M98,K22="QS" )

Pat



"Bob Phillips" wrote in message
...
Pat,

I was unclear whether by validation you meant DV or just a formula, it

is
clear now you meant the former, which is why it didn't work with the IF

in
it. Still not absolutely sure what the test is, but I think you want

if the J98<=M98 test only applies if K22="QS", then
=AND(K22="QS", J98<=M98)

if the J98<=M98 test only applies if K22 does not ="QS", then
=AND(K22<"QS", J98<=M98)

if either the J98<=M98 test applies or if K22 ="QS", then
=OR(K22="QS", J98<=M98)

Take your pick.

--
HTH

Bob Phillips

"Pat" wrote in message
...
Hi Bob,
Sorry for the vagueness of my post.
Originally the custom validation had the following formula:

=J98<=M98

this prevented a greater value in J98 being entered than the value
present
in M98

I now require modification when occasionally K22 contains the value

'QS'
I say occasionally because other values will be in K22 and this should
not
effect the custom validation.

I have tried your suggestion and it was not accepted by the validation
window.

Regards
Pat

"Bob Phillips" wrote in message
...
Pat,

Seeing as you don't tell us what you want, we can only guess, but

maybe

=if(OR(K22 ="QS",K22=J98,K22<=M98), do_something,do_something_else)


--
HTH

Bob Phillips

"Pat" wrote in message
...
The following custom validation is not correct, anyone know what is
wrong
with it?

=if(K22 ="QS")=J98<=M98

Pat












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
Data Validation Window? Ken Excel Discussion (Misc queries) 1 January 11th 05 10:48 PM
Excel 2002 custom toolbars fick Excel Discussion (Misc queries) 4 December 13th 04 09:51 PM
Excel2000: Custom data validation and named ranges Arvi Laanemets Excel Discussion (Misc queries) 9 December 10th 04 07:05 PM
Excel2K: Is it possible to use dynamic named ranges in custom data validation formula? Arvi Laanemets Excel Discussion (Misc queries) 0 December 2nd 04 11:29 AM
Custom Header Josh O. Excel Discussion (Misc queries) 1 December 1st 04 06:56 PM


All times are GMT +1. The time now is 05:39 AM.

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

About Us

"It's about Microsoft Excel"