View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Debra Dalgleish
 
Posts: n/a
Default relative cell reference in custom validation

When you create the data validation formula, refer to the active cell --
you can see its address in the name box, to the left of the formula bar.

Maybe you selected from cell B100, up to cell J10, and cell B100 was the
active cell. In that case, the formula would be:

=OR(A100<"Y",B100="")

GoBobbyGo wrote:
I want to set up a custom validation rule for a group of cells so that if the
value of the cell immediately to the left is "Y", nothing can be entered.

Let's say I want this rule in cells J10:J100.

So I highlight that range, go to data--validation, set it to custom and put
the formula =or(i10<"Y",j10="") in.

I hit ok, and check the validation in cell J10 and now it says
=OR(S65425<"Y",T65425="") (!)

The obvious workaround is to now go and highlight JUST J10, go to
data--validation, set it to custom, check the little box that says "apply
these changes to all other cells with the same settings", and fix the
validation formula.

But is there an easier way to make sure the relative references come out ok?



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html