Oct 17 2023 08:33 PM
I am making an inventory with three sheets
Inventory Inputs and Outputs everything works fine.
but when I try to add one more invoice and quantity in the input sheet it does not validate the quantity in the inventory sheet.
Please help me. I have already 1 week trying to figure out what is wrong and I can't find it.
Thanks
Oct 18 2023 03:35 AM
Hi @YOLY00T,
Use a dynamic named range for the validation formula. This will ensure that the validation formula is always applied to the correct cells, even if you add new invoices and quantities to the input sheet.
To create a dynamic named range for the validation formula, follow these steps:
=OFFSET(A1,0,0,COUNTROWS(A:A)-1)
Now, you can use the dynamic named range in the validation formula. For example, the following validation formula will compare the quantity in the input sheet to the quantity in the inventory sheet:
=InputQuantities <= InventoryQuantities
Replace InventoryQuantities with the cell reference for the quantity in the inventory sheet.
Once you have applied the validation formula to the input sheet, adding a new invoice and quantity should no longer cause the validation to fail.
Dynamic named ranges in Excel: https://www.ablebits.com/office-addins-blog/excel-dynamic-named-range/
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.
If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic
(LinkedIn)