Validating data in a cell with a formula

  • Thread starter Thread starter Pach
  • Start date Start date
P

Pach

Hi,

I am trying to use Data Validation in a cell which contains a formula
but it doesn't work.

If I put a Validation test (say cell A1 must be greater than 0) and
set the validation alerts on, and then try and type a negative number
into A1 the validation works fine. IF however I put a formula in A1
like = B4 and then type -5 in B4, cell A1 then shows -5 and no
validation alert is triggered.

Does validation only work for typed in figures or can it evaluate the
result returned to a cell by a formula??

Help much appreciated and thanks in advance

Pach
 
Pach
You must understand the difference between what is IN a cell and what is
DISPLAYED in the cell. When you put a formula into a cell, what is IN the
cell is the formula, and it doesn't change. The result of the formula is
what is DISPLAYED in the cell and that changes. Data Validation reacts to a
change in what is IN the cell, not what is displayed in the cell.
You can do what you want with code but not with Data Validation. HTH
Otto
 
Back
Top