SUMIFS with Absolute value and multiple criteria

rsd007

New Member
Joined
Oct 24, 2022
Messages
27
Office Version
  1. 2019
Platform
  1. Windows
Hello,
i am working on a task to calculate total value of product in Excel with multiple criteria and my formula of SUMIFS not working as the amounts are some +ve and some -ve so trying to do SUMIFS with absolute value base on each category, style various sizes as well as backorder and imperfect product. Hoping some one can help me out.

Thanks
For the help
Formula used in G 2 is =SUM(SUMIFS($F$2:F2, $B$2:B2,B2,$A$2:A2, {"Shirt","Blouse","Skirt","Tie"}))
and Formula used in H 2 is =SUM(SUMIFS($F$1:F2,$B$1:B2,B2,$A$1:A2,{"Shirt","Blouse","Skirt","Tie"})-SUM(SUMIFS($F$1:F2,$B$1:B2,B2,$A$1:A2,{"Shirt imperfect","Blouse imperfect","Skirt imperfect","Tie imperfect"})))
 

Attachments

  • G8 Formula.png
    G8 Formula.png
    134.2 KB · Views: 20
  • H8 formula.png
    H8 formula.png
    139.6 KB · Views: 20

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
=SUM(SUMIFS($F$2:F2, $F$2:F2, ">0", $B$2:B2,B2,$A$2:A2, {"Shirt","Blouse","Skirt","Tie"}))
This will only add up values greater than 0
=SUM(SUMIFS($F$2:F2, $F$2:F2, "<0", $B$2:B2,B2,$A$2:A2, {"Shirt","Blouse","Skirt","Tie"}))*-1
This will add values below zero and then multiply by -1 to make positive
OR use ABS()
ABS(SUM(SUMIFS($F$2:F2, $F$2:F2, "<0", $B$2:B2,B2,$A$2:A2, {"Shirt","Blouse","Skirt","Tie"})))
now you have the positive numbers

use
=(SUM(SUMIFS($F$2:F2, $F$2:F2, ">0", $B$2:B2,B2,$A$2:A2, {"Shirt","Blouse","Skirt","Tie"})) + ABS(SUM(SUMIFS($F$2:F2, $F$2:F2, "<0", $B$2:B2,B2,$A$2:A2, {"Shirt","Blouse","Skirt","Tie"}))))

then apply to both formulas
=(SUM(SUMIFS($F$2:F2, $F$2:F2, ">0", $B$2:B2,B2,$A$2:A2, {"Shirt","Blouse","Skirt","Tie"})) + ABS(SUM(SUMIFS($F$2:F2, $F$2:F2, "<0", $B$2:B2,B2,$A$2:A2, {"Shirt","Blouse","Skirt","Tie"}))))
- ( SUM(SUMIFS($F$1:F2, $F$2:F2, ">0", $B$1:B2,B2,$A$1:A2,{"Shirt imperfect","Blouse imperfect","Skirt imperfect","Tie imperfect"})))
ABS ( SUM(SUMIFS($F$1:F2, $F$2:F2, "<0", $B$1:B2,B2,$A$1:A2,{"Shirt imperfect","Blouse imperfect","Skirt imperfect","Tie imperfect"}))))
)

maybe better way to do it - but that is my first thought

Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet. Plus we cannot see any of the formulas used.

Therefore -

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC , then put the sample spreadsheet onto a share
I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed
 
Upvote 0
Solution

Forum statistics

Threads
1,214,632
Messages
6,120,655
Members
448,975
Latest member
sweeberry

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top