Home > Mobile >  How to use Custom Data Validation to make sure all values from one column are greater or equal other
How to use Custom Data Validation to make sure all values from one column are greater or equal other

Time:11-10

I need to create an Excel sheet for someone to fill as this example below:

enter image description here

I am trying to use Data Validation to avoid wrong numbers. In this case, all values from Col B must be greater or equal to Col A. So if the next value of Col A is 7 and for Col B is 5, then an error must be raised.

I tried to use a simple function as =B2:B4>A2:A4 in Custom Validation Data, but it didn't work and I am not a Excel expert.

Anyone could show me a solution?

Thanks!

CodePudding user response:

You have to select the range you want to apply the data validation.

Within the custom validation formula you have to write the formula for the first cell of that range --> =B2>=A2.

To have a complete solution you should apply a check if A2 has a value and I would add the vice versa check to column A as well:

  • Column A: =(B2<>"")*(A2<B2)
  • Column B: =(A2<>"")*(B2>=A2)
  • Related