diegomuser
New Member
- Joined
- May 16, 2021
- Messages
- 3
- Office Version
- 2019
- Platform
- MacOS
Good afternoon,
I have a problem validating or nesting 2 criteria in a custom data validation.
I have a worksheet with 3 columns
A-QUANTITY
B-PRODUCT CODE
C-STOCK AVAILABLE
In column A (QUANTITY) it has the custom data validation with the formula = C2> = 0 (in case it is fulfilled, it throws me an error of Insufficient Stock).
So far it works fine, the problem is that if another employee first enters the quantity (eg 200 units) and then the product code, the validation is not fulfilled and the available stock becomes a negative number.
Then I need another validation that tells the employee that if he first enters the quantity (column A) while Product code (column B) is empty, that it does not allow entering any data. It only allows you to enter the quantity, if the product code is previously entered.
The formula would be = B2 <> "" or also = NO (ISBLANK (B2)) ..... both are valid. With the error message "You must complete the product code first"
How do I nest these 2 criteria?
= C2> = 0 and = B2 <> "" or = NO (ISBLANK (B2))
Try leading Y and other variants but it doesn't work or gives syntax error.
Can you help me with the correct syntax or some macro that does the same?
Thank you!
I have a problem validating or nesting 2 criteria in a custom data validation.
I have a worksheet with 3 columns
A-QUANTITY
B-PRODUCT CODE
C-STOCK AVAILABLE
In column A (QUANTITY) it has the custom data validation with the formula = C2> = 0 (in case it is fulfilled, it throws me an error of Insufficient Stock).
So far it works fine, the problem is that if another employee first enters the quantity (eg 200 units) and then the product code, the validation is not fulfilled and the available stock becomes a negative number.
Then I need another validation that tells the employee that if he first enters the quantity (column A) while Product code (column B) is empty, that it does not allow entering any data. It only allows you to enter the quantity, if the product code is previously entered.
The formula would be = B2 <> "" or also = NO (ISBLANK (B2)) ..... both are valid. With the error message "You must complete the product code first"
How do I nest these 2 criteria?
= C2> = 0 and = B2 <> "" or = NO (ISBLANK (B2))
Try leading Y and other variants but it doesn't work or gives syntax error.
Can you help me with the correct syntax or some macro that does the same?
Thank you!