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
LVL 1
LeTayAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Wayne Taylor (webtubbs)Commented:
Try this...

=SUMIF(INDIRECT("'" & ABS($A4) & "'!C:C"); "D"; INDIRECT("'" & ABS($A4) & "'!D:D"))
0
Ray PaseurCommented:
Is this somehow related to PHP?
0
LeTayAuthor Commented:
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
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Saqib Husain, SyedEngineerCommented:
Try

=SUMPRODUCT((INDIRECT("'"&$A4&"'!C:C")="D")*ABS(INDIRECT("'"&$A4&"'!D:D")))
0
Rory ArchibaldCommented:
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"),INDIRECT("'"&$A4&"'!C:C");"D";INDIRECT("'"&$A4&"'!D:D"),">0")-=SUMIFS(INDIRECT("'"&$A4&"'!D:D"),INDIRECT("'"&$A4&"'!C:C");"D";INDIRECT("'"&$A4&"'!D:D"),"<0")

or use a SUMPRODUCT:
=SUMPRODUCT((INDIRECT("'"&$A4&"'!C:C")="D")*(ABS(INDIRECT("'"&$A4&"'!D:D"))))
0
LeTayAuthor Commented:
Well, now I get #VALUE! as result
0
Rory ArchibaldCommented:
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.
0
LeTayAuthor Commented:
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";INDIRECT("'"&$A4&"'!D:D"))
0
Rory ArchibaldCommented:
Try this one.
SUMIFS-ABS.xlsx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LeTayAuthor Commented:
Exactly what I need !
Many thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.