Forum Discussion
MNOP_
Jun 23, 2023Copper Contributor
How to limit the value inside a cell to a maximum value
I have a formula in a cell to calculate the number of days for example a stock item is sitting on the shelf.
The sheet is however only for a certain year. my current formula allows me to calculate the number of days, but I need it to only reach a maximum of 365 days. for example, some stock items in my 2022 sheet are now showing 487 days, and that number increases every day. so tomorrow it will show 488 days. etc etc. but I need it to just max out at 365 days after the year is done.
If the stock item sits on the shelf for longer than 365 days, it will move over to the next years inventory sheet.
How can I do this? i.e. make sure that the cell value is always a max of 365. my current formula:
=IF(E3="";""; IF(I3>0; (I3-E3); IF(I3="";(TODAY()-E3) )))
thanks !
- Riny_van_EekelenPlatinum Contributor