Sum across columns based on criteria of column label

Sus Controlling

New Member
Joined
Oct 15, 2014
Messages
3
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Jan
[/TD]
[TD]Feb
[/TD]
[TD]Mar
[/TD]
[TD]Apr
[/TD]
[TD]May
[/TD]
[TD]Jun
[/TD]
[TD]Jul
[/TD]
[TD]Aug
[/TD]
[TD]Sep
[/TD]
[TD]Oct
[/TD]
[TD]Nov
[/TD]
[TD]Dec
[/TD]
[TD]Total YTD
[/TD]
[TD]Total YE
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Actual
[/TD]
[TD]Actual
[/TD]
[TD]Actual
[/TD]
[TD]Actual
[/TD]
[TD]Actual
[/TD]
[TD]Actual
[/TD]
[TD]Actual
[/TD]
[TD]FCST
[/TD]
[TD]FCST
[/TD]
[TD]FCST
[/TD]
[TD]FCST
[/TD]
[TD]FCST
[/TD]
[TD]YTD
[/TD]
[TD]All
[/TD]
[/TR]
[TR]
[TD]pt1
[/TD]
[TD]10
[/TD]
[TD]10
[/TD]
[TD]10
[/TD]
[TD]10
[/TD]
[TD]15
[/TD]
[TD]15
[/TD]
[TD]15
[/TD]
[TD]20
[/TD]
[TD]20
[/TD]
[TD]20
[/TD]
[TD]30
[/TD]
[TD]30
[/TD]
[TD]85
[/TD]
[TD]205
[/TD]
[/TR]
[TR]
[TD]pt2
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]pt3
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

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

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.
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,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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