Forum Discussion
Need a formula for inventory
- Jun 07, 2024
Your formulas use H2 and J2 for the date range, but the screenshot shows I2 and K2.
Try this formula:
=SUMPRODUCT(InwardQty[[1-Jun-24]:[31-Jul-24]], (InwardQty[Item Name]=[@[Item Name]])*(DATEVALUE(InwardQty[[#Headers],[1-Jun-24]:[31-Jul-24]])>=$H$2)*(DATEVALUE(InwardQty[[#Headers],[1-Jun-24]:[31-Jul-24]])<=$J$2))
We have to use DATEVALUE since the headers of a table are text, even if they look like dates.
If the date range is in I2 and K2, change $H$2 to $I$2 and $J$2 to $K$2.
Your formulas use H2 and J2 for the date range, but the screenshot shows I2 and K2.
Try this formula:
=SUMPRODUCT(InwardQty[[1-Jun-24]:[31-Jul-24]], (InwardQty[Item Name]=[@[Item Name]])*(DATEVALUE(InwardQty[[#Headers],[1-Jun-24]:[31-Jul-24]])>=$H$2)*(DATEVALUE(InwardQty[[#Headers],[1-Jun-24]:[31-Jul-24]])<=$J$2))
We have to use DATEVALUE since the headers of a table are text, even if they look like dates.
If the date range is in I2 and K2, change $H$2 to $I$2 and $J$2 to $K$2.
HansVogelaar
Thank you 🙂