LeTay
asked on
Use a function on a indirect range
I use this formula : =SUM.IF(INDIRECT("'"&$A4&" '!C:C");"D ";INDIRECT ("'"&$A4&" '!D:D"))
Now in fact I want the sum argument to be the absolute value so, something like this ABS(INDIRECT("'"&$A4&"'!D: D"))
I suspect this is possible as this remembers me something similar (but I don't remember where I saw it)
Thanks
Now in fact I want the sum argument to be the absolute value so, something like this ABS(INDIRECT("'"&$A4&"'!D:
I suspect this is possible as this remembers me something similar (but I don't remember where I saw it)
Thanks
Is this somehow related to PHP?
ASKER
No, not PHP
Wayne, not ABS($A4)
The referenced range contains positive and negative value (in the other sheet)
I want the sum of ABS values
The ABS must be applied to the values, not the references
Wayne, not ABS($A4)
The referenced range contains positive and negative value (in the other sheet)
I want the sum of ABS values
The ABS must be applied to the values, not the references
Try
=SUMPRODUCT((INDIRECT("'"& $A4&"'!C:C ")="D")*AB S(INDIRECT ("'"&$A4&" '!D:D")))
=SUMPRODUCT((INDIRECT("'"&
You can't apply functions in the sum range with SUMIF. You could either use 2 SUMIFS and subtract the negative result:
=SUMIFS(INDIRECT("'"&$A4&" '!D:D"),IN DIRECT("'" &$A4&"'!C: C");"D";IN DIRECT("'" &$A4&"'!D: D"),">0")- =SUMIFS(IN DIRECT("'" &$A4&"'!D: D"),INDIRE CT("'"&$A4 &"'!C:C"); "D";INDIRE CT("'"&$A4 &"'!D:D"), "<0")
or use a SUMPRODUCT:
=SUMPRODUCT((INDIRECT("'"& $A4&"'!C:C ")="D")*(A BS(INDIREC T("'"&$A4& "'!D:D"))) )
=SUMIFS(INDIRECT("'"&$A4&"
or use a SUMPRODUCT:
=SUMPRODUCT((INDIRECT("'"&
ASKER
Well, now I get #VALUE! as result
With which formula? If it's the SUMPRODUCT one, you probably have text values in at least one of the data rows. Change the ranges to not include header rows and any other text rows, if you can.
ASKER
Can you provide a small Excel example ?
I have the french version ... will be easier (automatic translation of formula)
My current formula (without ABS) and working fine (some non numeric cells present) was :
=SOMME.SI(INDIRECT("'"&$A4 &"'!C:C"); "D";INDIRE CT("'"&$A4 &"'!D:D"))
I have the french version ... will be easier (automatic translation of formula)
My current formula (without ABS) and working fine (some non numeric cells present) was :
=SOMME.SI(INDIRECT("'"&$A4
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Exactly what I need !
Many thanks
Many thanks
=SUMIF(INDIRECT("'" & ABS($A4) & "'!C:C"); "D"; INDIRECT("'" & ABS($A4) & "'!D:D"))