MS Excel / OOo Calc experts...

GigaCluster

Golden Member
Aug 12, 2001
1,762
0
0
I have a spreadsheet to serve as a transaction log for Monopoly... my friends the geeks play it occasionally at my house and we love the immediate charts that OOo Calc provides for our transactions. What I want to do is have a cell with the turn number, like 1, 15, 27, etc. Then in another cell, I want to create a formula that create a sum of everyone's net worth for that turn.

For example:
Cell E1 has the turn number.
Columns A, B, and C have each player's net worth, one column per player and one row per turn, so A1 has the first player's first turn's log, C2 has the third player's second turn's, etc.
E5 has the sum of all players' net worth at that point of the game. So, I want to do something like this:
=SUM(A[E1]; B[E1], C[E1])
which should dynamically resolve into:
=SUM(A7; B7; C7)
if E1 has a 7 in it.

Is that doable? I am sure that it's not an incredibly esoteric or unusual action in a spreadsheet...
 

kranky

Elite Member
Oct 9, 1999
21,020
156
106
I couldn't figure out how to do it elegantly, but I got it to work in a two-step process. Maybe someone else can clean it up a bit.

If you can spare the cells F1-H1, do this:

in F1, enter the formula =concatenate("A",e1) F1 will contain the letter "A" followed by whatever number is in E1.
in G1, enter the formula =concatenate("B",e1)
in H1, enter the formula =concatenate("C",e1)

Then in E5, enter the formula =SUM(INDIRECT(F1):INDIRECT(G1):INDIRECT(H1))