Sum numbers using two row and sum the numbers greater then 0 using row 1 as the default

frankday

Board Regular
Joined
Apr 13, 2012
Messages
102
I have row 1 (2019) totals Row 2 (2018) totals. Row 2 has all 12 months worth of data. Row 1 has 9 months worth of data. I need the sum of all 9 months in row 1 and the last 3 of row 2. That easy enough. Now when I collect the totals for the 10th month of row 1 I then need the total for months 1 - 10 of row 1 and month 11-12 of row 2. How can I do with without creating 12 different if statements.

Annotation%202019-10-14%20111123.png
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
You can try this. Formula R6 sums the current row's monthly values and uses the prior year's values for empty months.


[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]
Book1
DEFGHIJKLMNOPQR
5123456789101112Sum_rowSum_Projected
62019100100100100100100100100100900930
72018101010101010101010101010120
Sheet43
Cell Formulas
RangeFormula
Q6=SUM(E6:P6)
Q7=SUM(E7:P7)
R6=SUM(IF(E6:P6,"",OFFSET(E6:P6,1,)))+SUM(E6:P6)
[/FONT]
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,399
Members
448,957
Latest member
Hat4Life

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top