|
|
|
Диагональное ссумирование
|
|||
|---|---|---|---|
|
#18+
авторI have the following problem: In cells A1:E1: 1, 2, 3, 4, 5 In cells A2:E2: 6, 7, 8, 9, 10 In cells A5:E5: 21, 22, 23, 24, 25 Now I want to total diagonally (A1, B2, C3, D4 and E5) and I do that by the formula: =SUM((ROW(A1:A5)=COLUMN(A1:E1))*(A1:E5)) - array entered. This works fine (sum =65), but I wondered how can I total diagonally "the other way" (here A5, B4, C3, D2 and E1)? To sum A5:E1 diagonally, use: =SUM(N(OFFSET(E1,ROW(1:5)-1,-1*ROW(1:5)+1))) Or (not Array Entered): =SUMPRODUCT(N(OFFSET(E1,ROW(INDIRECT("1:5"))-1,-1*ROW(INDIRECT("1:5"))+1))) It would be better to use ROW(INDIRECT("1:5") in all the formulas, like =SUM(N(OFFSET(E1,ROW(INDIRECT("1:5"))-1,-1*ROW(INDIRECT("1:5"))+1))) as inserting a row above row 5 will change the reference. To sum across sheets (Sheet1!A1 Sheet2!B2 Sheet3!C3..etc) use: =SUM(N(INDIRECT("Sheet"&ROW(1:5)&"!"&ADDRESS(ROW(1:5),ROW(1:5))))) Or (not Array Entered): =SUMPRODUCT(N(INDIRECT("Sheet"&ROW(1:5)&"!"&ADDRESS(ROW(1:5),ROW(1:5))))) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 18.07.2006, 12:12:25 |
|
||
|
|

start [/forum/topic.php?fid=61&gotonew=1&tid=2184606]: |
0ms |
get settings: |
9ms |
get forum list: |
15ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
69ms |
get topic data: |
10ms |
get first new msg: |
7ms |
get forum data: |
3ms |
get page messages: |
33ms |
get tp. blocked users: |
2ms |
| others: | 224ms |
| total: | 380ms |

| 0 / 0 |
