SOLVED

calculating sum of values in columns based upon column header

Copper Contributor

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!!

 

JanFebMarAprMayTTL
ActualActualActualBudgetBudget 
$100$150$150$200$200$400
2 Replies
best response confirmed by tkainz (Copper Contributor)
Solution

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?

 

Perfect.... Thanks!!!

1 best response

Accepted Solutions
best response confirmed by tkainz (Copper Contributor)
Solution

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?

 

View solution in original post