Excel {Sum(IF)} Multiple columns


I originally had a sumifs formula that was trying to sum 49 adjacent columns. Learning this isn't possible with sumifs, I constructed the following array formula which works:

{=SUM(IF('Integrated Areas'!$D$7:$D$68=$A4,(SUM('Integrated Areas'!$J$7:$BF$68))))}

I would like to add the following additional criteria to it, but not sure how:

=if((J5:BF5)">="&AB3, if((J5:BF5)"<"&AC3

What's the best way of doing this?

Who is Participating?

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

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.

SteveCost AccountantCommented:
I would try something like:


=SUM(N('Integrated Areas'!$D$7:$D$68=$A4)*N('Integrated Areas'!$J$5:$BJ$5>=AB3)*N('Integrated Areas'!$J$5:$BJ$5<=AC3)*'Integrated Areas'!$J$7:$BJ$68)

Open in new window

This breaks the IF into an N which can be easier to understand:

Open in new window

Where there is an 'N' formula it returns 1 when true and 0 when false.
Then it multiplies each row by the N result and the values in J to BF.
This should work, though is hard to test without your workbook or a sample workbook.
Saurabh Singh TeotiaCommented:
You can use this formula...

=Sumproduct(('Integrated Areas'!$D$7:$D$68=$A4)*('Integrated Areas'!J5:BF5>=AB3)*('Integrated Areas'!J5:BF5<AC3)*('Integrated Areas'!$J$7:$BF$68))

Open in new window


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
dabug80Author Commented:
Great. Thanks. I still don't know how to do sumproduct. I've tried to learn it twice, but still didn't crack it.
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.