ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Add up Plus & Minus Figures separately by Location (https://www.excelbanter.com/excel-worksheet-functions/9580-add-up-plus-minus-figures-separately-location.html)

John

Add up Plus & Minus Figures separately by Location
 
I have 3 columns of Data, Location, Date and Stock Variances. I wish to Add
up The total PLUS Stock Variances per Location in one cell and the MINUS
Stock Variances per Location in another cell.

My data is variable in length, thus I will assign Range Names to the 3
columns. I am not sure how I can add up and distinguish both Location and
whether the Stock variance is either Positive or negative.


Thanks



cmart02

John,

You can try this:

=SUMPRODUCT(--(varianceRange<0)*(locationRange=LocationCodeOrNam e),varianceRange)

Will add all variance smaller than zero for a given location.

Regards,
Robert

John

Excellent Robert, exactly what I needed

Thanks


"cmart02" wrote in message
...
John,

You can try this:


=SUMPRODUCT(--(varianceRange<0)*(locationRange=LocationCodeOrNam e),varianceR
ange)

Will add all variance smaller than zero for a given location.

Regards,
Robert





All times are GMT +1. The time now is 07:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com