A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
That won't work.
Let's say you have a formula in C2 that depends on A2 and B2. The values of A2 and B2 are entered by the user.
You'll have to create data validation rules for A2 and B2 instead of for C2.
Here is a simple example: C2 contains the formula =SUM(A2:B2).
You want the sum to be between 0 and 10.
Select A2 and B2.
On the Data tab of the ribbon, click Data Validation,
Select Custom from the Allow dropdown.
Enter the formula =AND($C2>=0,$C2<=10)
Activate the Error Alert tab and enter an appropriate error message.
Click OK.
Result: