I have some cells, for example three cells: p1, p2, p3
Then I need to calculate the following result: (p1*p2 + p1*p3 +p2*p3)
Number of cells may be various. How can I do this?
Thanks!
I have some cells, for example three cells: p1, p2, p3
Then I need to calculate the following result: (p1*p2 + p1*p3 +p2*p3)
Number of cells may be various. How can I do this?
Thanks!
If you put in 4th cell (P4) =P1 you can do this:
=SUMPRODUCT(P1:P3;P2:P4)
Never use Merged Cells in Excel
@zbor, I might be wrong but I don't think that would be scalable for 2 to n terms ?
Perhaps something like:
The above is for the three term A1:C1 example.![]()
Please Login or Register to view this content.
To adjust for increasing numbers of unique terms you would alter A1:C1 accordingly (eg to sum all 6 combinations for 4 unique terms you would reference the 4 values A1:D1)
If needed you could use a Dynamic Named Range to simplify the above and make range references adjust as per values added
I'm sure the math guys above will be able to shorten the above or produce a much simplified (non-array) version
Last edited by DonkeyOte; 10-24-2010 at 08:58 AM. Reason: revised note re: DNR
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks