Sum across columns based on criteria of column label

Sus Controlling

New Member
Joined
Oct 15, 2014
Messages
3
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Total YTD
Total YE
Actual
Actual
Actual
Actual
Actual
Actual
Actual
FCST
FCST
FCST
FCST
FCST
YTD
All
pt1
10
10
10
10
15
15
15
20
20
20
30
30
85
205
pt2
pt3

<tbody>
</tbody>

Each month I want the formula for YTD to reflect the new month's actual data. They will load the label "Actual" in the column heading and replace the previously loaded forecast data. I want the formula to automatically be ready to sum accordingly for the Actual values. The spreadsheet is huge and has similar areas where this is needed and I need to avoid the user forgetting to adjust these formulas.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Code:
=SUMIF($B$2:$M$2,"Actual",$B$3:$M$3)

Where your table starts in A1. Row 2 is the headers and Row 3 is pt1 data.
 
Upvote 0
Assuming that your table starts at A1, try...

N3, copied down:

=SUMIF($B$2:$M$2,"Actual",B3:M3)

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,214,870
Messages
6,122,019
Members
449,060
Latest member
LinusJE

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