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

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
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,942
Messages
6,122,366
Members
449,080
Latest member
Armadillos

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