Diagonal Addition

I have a requirement where I need to add the values diagonally. Let me explain it with an example:

The data set looks like this

M1 1 2 3
M2 4 5 6
M3 7 8 9

I need the add the diagonal values i.e., 1+5+9 and display the results.

How to go about this? :confused: Thanks in advanceā€¦

Regds,
Sridhar :mrgreen:


Sridhar :india: (BOB member since 2003-07-03)

Iā€™m gonna say maybe.

You can do most anything if the formula is right. So, there must be some sort of calculation you can do on each row that picks out the cell you want, Then you can simply duplicate that formula in the footer.


Steve Krandel :us: (BOB member since 2002-06-25)

Iā€™m going to say yes, though I couldnā€™t fathom why youā€™d need this.

You will need to create a variable to calculate the RowNumber and ColumnNumber. The following are examples of what you need:

RowNum
=RunningCount() in

ColNum
=RunningCount() in

Variable to determine if the rows need to be added together:
=sum(If = then )

You can create ā€œoffsetā€ versions by using items such as:
=sum(If =+1 then )

You will want this as your total object, but display your in the body of the crosstab as normal.

-RM


digpen :us: (BOB member since 2002-08-15)