Different ways to calculate/sum with a formula in an excel report
In every report, I need to sum/calculate values and also the time, I mean the hours between for instance today and yesterday. For some, they are quite easy and for others, more difficult but there is always a way to get the final result.
When I use the formula ?
Every time to get the total result of something.
How to use the formula ?
The formula in this topic is with "," so depending of the operating system of your PC, the formula should have ";" instead of ",".
How is/are the formula(s) ?
=SUM()
=SUMPRODUCT()
The basic way to sum all values are using this formula:
=SUM(C2:C4)
Of course, you can put “=C2+C3+C4” and you will get the same result.
This one will calculate only if it finds “chocolate” and “dark”, so it will tell you how much:
=SUMPRODUCT((A2:A4="chocolate")*(B2:B4="dark"))
To calculate the time between today and other day:
=NOW()-B2
And if you want to calculate the time between “end” and “start”, the formula is simpler:
=B2-A2
But as you can see in the cell D3, the time showing is more than 24h. If you need to display like the example, you have to format the cell by using the “custom” option by putting:
[hh]:mm
And if you want the seconds, just add “:ss”.
For more option, read Sum and count sales with a formula in an excel report.
Interesting Topics
-
Be successfully certified ITIL 4 Managing Professional
Study, study and study, I couldn’t be successfully certified without studying it, if you are interested...
-
Be successfully certified ITIL 4 Strategic Leader
With my ITIL 4 Managing Professional certification (ITIL MP) in the pocket, it was time to go for the...
-
Hide visual and change background color based on selection
Some small tricks to customize the background colour of a text box...
-
Stacked and clustered column chart or double stacked column chart
In excel, I use a lot the combination of clustered and stacked chart...