Question Concerning Excel Sumifs

Hello,

I was wondering if there was a way without using an If statement at the front to check if 'Region-Template'!$C$3 = "Total", if it is don't do the final check or allow everything.  IF not equal to "Total", do the final check.

Thank you,


=-SUMIFS('Export -Region|Total'!$L:$L,'Export -Region|Total'!$M:$M,$C9,'Export -Region|Total'!$B:$B,'Region-Template'!J$5,'Export -Region|Total'!$A:$A,'Region-Template'!J$6,'Export -Region|Total'!$H:$H,'Region-Template'!$C$3)
LVL 1
mattfmillerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

byundtMechanical EngineerCommented:
I think you need an IF function to handle the two conditions:
=IF('Region-Template'!$C$3="Total",-SUMIFS('Export -Region|Total'!$L:$L,'Export -Region|Total'!$M:$M,$C9,'Export -Region|Total'!$B:$B,'Region-Template'!J$5,'Export -Region|Total'!$A:$A,'Region-Template'!J$6),-SUMIFS('Export -Region|Total'!$L:$L,'Export -Region|Total'!$M:$M,$C9,'Export -Region|Total'!$B:$B,'Region-Template'!J$5,'Export -Region|Total'!$A:$A,'Region-Template'!J$6,'Export -Region|Total'!$H:$H,'Region-Template'!$C$3))
byundtMechanical EngineerCommented:
Another approach would be to put the IF test inside the SUMIFS. You get a much shorter formula as a result, but the test will always be performed. The trick is choosing a criteria that will always be satisfied when 'Region-Template'!$C$3 equals Total:
=-SUMIFS('Export -Region|Total'!$L:$L,'Export -Region|Total'!$M:$M,$C9,'Export -Region|Total'!$B:$B,'Region-Template'!J$5,'Export -Region|Total'!$A:$A,'Region-Template'!J$6,'Export -Region|Total'!$H:$H,IF('Region-Template'!$C$3="Total","<>1E+40",'Region-Template'!$C$3))

I picked 10^40 as a value that Export-Region|Total column H was never going to see. If Region-Template cell C3 equals Total, then the SUMIFS uses the extremely unlikely to fail test on Export-Region|Total column H not equaling 1E+40. Otherwise, it uses Region-Template cell C3 for that test.

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
mattfmillerAuthor Commented:
Thank you very much.
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.