• 549K Members
• 6,898 Online
• 657K Conversations
SOLVED

Highlighted
New Contributor

# calculating sum of values in columns based upon column header

I have 12 columns of data representing the 12 months and a totals column.  I would like a formula to total the individual values in each of the rows of the twelve columns but only if the respective column headers have a certain text value ("Actual" vs. "Budget").  In this example (using 5 months for brevity) the formula in col 6 ("TTL") should only add those values in cols 1 through 5 if row 2 for each corresponding column has the value "Actual".  Thanks!!

 Jan Feb Mar Apr May TTL Actual Actual Actual Budget Budget \$100 \$150 \$150 \$200 \$200 \$400
2 Replies
Highlighted
Solution

# Re: calculating sum of values in columns based upon column header

Hello,

this is easy with the Sumifs function.

=Sumifs(3:3,\$2:\$2,"Actual")

In words: sum all the values in row 3 where row 2 has the text "Actuals" in the same column.

You can copy that formula down to apply to other rows below.

Does that help?

Highlighted

# Re: calculating sum of values in columns based upon column header

Perfect.... Thanks!!!

Related Conversations
Pivot table
gabriellerocha in Excel on
5 Replies