My problem is quite simple but describing it is somewhat complicated.
I have four cells containing four integers, which signify row and column numbers of two cells. E.g.
A B 1 54 23 2 154 123
So we have two cells:
- Cell #1: row 54, column 23 and
- Cell #2 row 154, column 123.
I want to sum the contents of all cells between Cell #1 and Cell #2. Of course, I want references to cells A1, A2, B1, B2 containing the relevant values, not the actual values. Say, I want to put this sum in cell C3.
In VBA it would be simple (albeit lengthy):
Range("C3").Cells = WorksheetFunction.Sum( _ Range(Cells(Cells(1,1),Cells(1,2)), _ Cells(Cells(2,1),Cells(2,2))))
How to do it without VBA?
I tried something like
=SUM(ADDRESS(A1,B1),ADDRESS(A2,B2)). My problem is, using ADDRESS() returns text. If I place this text in SUM(), it returns an error.