I am designing an invoice maker in Libreoffice for special orders in our local Store. The goal is to simplify the cashier's job by totaling the value of each department key they will have to enter a value for. In example if I have an order with 25 items but 5 separate departments.
Here is the formula I am using at the moment to check if L1:L25 have "Beer" as a value.
=SUM(IF(L1 = "Beer", K1, 0), IF(L2 = "Beer", K2, 0), IF(L3 = "Beer", K3, 0)), Etc...
This formula works but it's rather lengthy. Is there an easy way to condense this formula? The value it returns is the sum of every $ Value in the cell to the Left of each cell with the value "Beer".
SUM(IF...)
is the long way of doing SUMIF
:
=SUMIF(L1:L25,"Beer",K1:K25)