ABS

Zubair

Active Member
Joined
Jul 4, 2009
Messages
304
Office Version
  1. 2016
Platform
  1. Windows
Hi Team,

Can you please teach me how to add ABS in my given formula, I want ABS to convert negative to positive.

=IF(MATCH($D$201,$FK$1:$FV$1,0)<=MATCH($B$2,$FK$1:$FV$1,0),SUMIFS(TB!$J:$J,TB!$G:$G,$A214,TB!$F:$F,F$2)+SUMIFS(F$3:F$199,$B$3:$B$199,$A214),0)
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Which part of that formula need to be absolute?
 
Upvote 0
if you want to have the result in ABsolutes:
Excel Formula:
ABS(SUMIFS(TB!$J:$J))
ABS(SUMIFS(F$3:F$199))

if you want to sum absolutes:
Excel Formula:
SUMIFS(ABS(TB!$J:$J))
SUMIFS(ABS(F$3:F$199))
 
Upvote 0
Ok, how about
Excel Formula:
=IF(MATCH($D$201,$FK$1:$FV$1,0)<=MATCH($B$2,$FK$1:$FV$1,0),SUMPRODUCT((TB!$G:$G=$A214)*(TB!$F:$F,F$2)*(ABS(TB!$J:$J)))+SUMPRODUCT(($B$3:$B$199=$A214)*(ABS(F$3:F$199))),0)
although it's best not to use whole column references in this type of formula.
 
Upvote 0
Solution
@Fluff
Then why is it working in this example:
Book1
FGHIJK
1
2=SUM(ABS(I5:I14))=SUM(J5#)
3Result:379595
4
5Data:151515
6444
7444
8888
9181818
10-6-66
11171717
12-4-44
13-9-99
14-10-1010
15
Sheet1
Cell Formulas
RangeFormula
I2:J2I2=FORMULATEXT(I3)
H3H3=SUM(H5:H14)
I3I3=SUM(ABS(I5:I14))
J3J3=SUM(J5#)
J5:J14J5=ABS(I5:I14)
Dynamic array formulas.
 
Upvote 0
Because it's not what you originally suggested & also not what the OP is after.
 
Upvote 0
hmmm
I tested it myself - you were right
Book1
FGHIJKLMN
1
2=SUM(ABS(I6:I15))=SUM(J6#)Criteria1Criteria2Criteria3
3Result:379595234923
4234923
5
6Criteria115151515
7Criteria14444
8Criteria14444
9Criteria28888
10Criteria218181818
11Criteria2-6-666
12Criteria217171717
13Criteria3-4-444
14Criteria3-9-999
15Criteria3-10-101010
16
Sheet1
Cell Formulas
RangeFormula
I2:J2I2=FORMULATEXT(I3)
K2:M2K2=TRANSPOSE(UNIQUE(G6:G15))
H3H3=SUM(H6:H15)
I3I3=SUM(ABS(I6:I15))
J3J3=SUM(J6#)
K3:M3K3=SUMIFS(K6#,G6:G15,K2#)
K4:M4K4=SUM(ABS($I$6:$I$15)*($G$6:$G$15=K2))
J6:J15J6=ABS(I6:I15)
K6:K15K6=ABS(I6:I15)
Dynamic array formulas.


Altho I have no idea sumifs works on absolute range but when I put abs onto my range it stops working.

neverthe less. standard sum function works properly
 
Upvote 0

Forum statistics

Threads
1,215,480
Messages
6,125,048
Members
449,206
Latest member
Healthydogs

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