Computer Tutoring Logo

Sum by Month


The following scenario was posed by one of our clients. She wanted to use AutoSum to sum up the sales of the months of the year. However she only wanted to include the current month after the current month had passed. For example if the month was September, then we would sum up to the previous month, which would be August. Then once September had passed the calculation would also include September and so on as the year progresses.

  1. Click in N2
  2. In the Formula by type:
    =SUM(INDEX(B2:M2,1):INDEX(B2:M2,MONTH(TODAY()))

    The Month() function extracts the month from the Today() function. The Today() function gets today's date.
  3. AutoFill the rest of the figures down.