Calc returns auto response based on date and status

Using Calc for a stocklist - date item purchased / Price / Status (sold or stock) which dependent upon the status - either adds a value (stock item) or does not when sold.
I have begun trying with this basic sheet, to solve the issue, I’m struggling to find a solution - if anyone can suggest a tweak or change of data string, I’ll try it.

Date Item Price Status Stock Level
01/11/2024 Product A 11.00 Sold 0
02/11/2024 Product B 22.00 Sale 0
03/11/2024 Product C 33.00 Sold 0
07/11/2024 Product A 44.00 Sale 0
09/11/2024 Product B 55.00 Sale 0

=SUMPRODUCT(YEAR($A$2:$A$6)=2024,MONTH($A$2:$A$6)=11,$D$2:$D$6=E$1,$C$2:$C$6)

In what sense? Somewhere in column D there is a Status equal to “Stock Level”?

CreateAndFilterPivotTable

Thank you for the reply JohnSUN. I tried to find a way to upload the sheet i was working with, but I could not appear to do so, That was why i simply uploaded the data string and
basic outline.

Using your sheet:
A = Date
B = Product
C = Price
D = Status
E = Stock Level * I was trying to find a way to have Column E auto display the value of stock remaining on sale, when D shows “Sale” or “On Sale”.
s

Something like this?
=SUMPRODUCT(YEAR($A$2:$A$60)=2024;MONTH($A$2:$A$60)=11;$B$2:$B$60=B2;($D$2:$D$60="Sale")+($D$2:$D$60="On Sale");$C$2:$C$60)

1 Like