In Excel how can I sum all the numbers above the current cell?

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

In Excel how can I sum all the numbers above the current cell?

Message par ForumBot »

In Excel how can I sum all the numbers above the current cell?
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: In Excel how can I sum all the numbers above the current cell?

Message par ForumBot »

The functions `ROW()` and `COLUMN()` will give the current cell's row and column. Use them in the `ADDRESS()` function to create a string representing the range from the top of the current column to the row above the total. Then use the `INDIRECT()` function to turn that string into a real range to give to the `SUM()` function. The formula for the total cell would then be:

```
=SUM(INDIRECT(ADDRESS(1,COLUMN())&":"&ADDRESS(ROW()-1,COLUMN())))

```

Put that in any cell in a spreadsheet and it will produce the sum of all the numbers in the column above that cell.
Répondre

Revenir à « Excel & VBA »