IfSum question

Copper Contributor

I have an Excel sheet with 12 columns and several rows of data.  I need to create a column of YTD information that will change depending upon the month.  What would my formula be if I change the # in the current month cell "O" so that my ytd # becomes the sum of all the months to that point?

 

            Current Month4
DescriptionMonth 1Month 2Month 3Month 4Month 5Month 6Month 7Month 8Month 9Month 10Month 11Month 12 YTD
Revenue100200300400500600700800800800800800  
COGS505050505050505050505050  
Gross Income50150250350450550650750750750750750  
3 Replies

@ACoffi1967 In what would be P3 (if I counted correctly) enter this:

=SUM(C3:OFFSET(B3,0,$O$1))

 

Revenue is Row 3, Description is Column A = so revenue is A3
For each month then Revenue would be B3, C3, etc.
The # that changes o return the sum is Current month - in example 4 in Cell N1
So if N1 is 4 the total should be sum of B2:E2
If N1 changes to 3 the total should be sume of B2:D2
Got it! Thanks.