Custom Data Validation Formula


#1

Hi Laurence,



Just a quick question about setting formula for Custom Data
Validation. I want to set up a CellArea to be validated by a
single Validation, which checks two things:

  1. That the value is postive or zero
  2. That the cell isn’t blank.



    The ideal formula is something like: =AND(cell>=0,cell<>""),
    however won’t this always reference the same cell for the area?

    eg. for the formula =AND(O3>=0,O3<>"") - won’t
    every cell in the CellArea be validated against ‘O3’? Does
    Aspose.Excel have a way to specify ‘current cell’ for a data validation
    formula, so that each cell is validated by checking its own value?



    Kind Regards,

    Seb

#2

You can try:

"=AND(INDIRECT(ADDRESS(ROW(),COLUMN()))>=0, NOT(ISBLANK())"