Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

LibreOffice Calc: SUMIFS based on each row condition

Writer Matthew Barrera

Assume I have the following data:

enter image description here

I want to do a calculation based on each currency and amount. Something like:

enter image description here

So money in (for USD) will be the sum of column H where the amount is positive, and the currency is USD. Money out (for USD) will be the sum of column H where the amount is negative, and the currency is USD.

How to calculate this? I'm thinking of using SUMIFS, but I always get Err:502. My formula is :

=SUMIFS($H$2:$H$65440, G2, "USD", H2, ">0")

1 Answer

From the official Libreoffice documentation

Func_Range and Range1, Range2... must have the same size, otherwise the function returns err:502 - Invalid argument.

So you must use ranges in your conditions, and your formula should be

=SUMIFS($H$2:$H$65440, $G$2:$G$65440, "USD", $H$2:$H$65440, ">0")

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy