Formula to refer to a range


I'd like someone help me with a formula to find difference in a range.
Perhaps this one can be modified. Replace the SUM with a condition that will find the difference.
=SUM(INDIRECT("AV"&A4&":AV"&B4))      Col A  20  Col B 100                              
AV100   80     AV20   30     result  50

Many thanks

Ian BellretiredAsked:
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.

Bill PrewCommented:
Currently you are summing ALL cells between AV20 and AV100 to get a total of those 81 cells.  What do you mean by "difference in a range"?

If you just want to subtract the two cells referenced, then you could do:


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
Ian BellretiredAuthor Commented:
Yes that's it Bill, thank you very much
Bill PrewCommented:
Welcome, glad that was helpful.

Ian BellretiredAuthor Commented:
Have you any ideas on the other similar one I posted a couple of hours ago ?
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.