Forum Discussion

Guindina's avatar
Guindina
Copper Contributor
Apr 06, 2023

Need to do an IFERROR formula in a 3rd colunm.

If the first column A has a value > 0 then I want an error if column c an d is fill with any number then show an error. Colum B has a formuls of A*.10, if we try to put a value on C it can make error because A is >0.

        A           B         C          D         E          F

1        100       10                                              (I want an error message and cannot enter value in C             2         0          0        5

3

4                                                                          because A & B is already fill

                            

  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    Guindina 

    You can use data validation to prevent users from entering values in columns C and D if column A has a value greater than 0.

     

    Here’s how you can do this:

    1. Select the cells in columns C and D where you want to apply the data validation.
    2. Click on the Data tab in the ribbon and select Data Validation from the Data Tools group.
    3. In the Data Validation dialog box that opens, select Custom from the Allow drop-down menu.
    4. In the Formula field, enter the following formula: =IF($A1>0,FALSE,TRUE)
    5. Click on OK to apply the data validation.

     

    Now, if a user tries to enter a value in columns C or D when column A has a value greater than 0, they will see an error message and will not be able to enter the value.

    You can also customize the error message that is displayed by clicking on the Error Alert tab in the Data Validation dialog box and entering your desired message.

Resources