New Contributor

# IfSum question

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 Month 4 Description Month 1 Month 2 Month 3 Month 4 Month 5 Month 6 Month 7 Month 8 Month 9 Month 10 Month 11 Month 12 YTD Revenue 100 200 300 400 500 600 700 800 800 800 800 800 COGS 50 50 50 50 50 50 50 50 50 50 50 50 Gross Income 50 150 250 350 450 550 650 750 750 750 750 750
3 Replies

# Re: IfSum question

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

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

# Re: IfSum question

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.