Sum based on multiple column headers and row

jjramirez85

New Member
Joined
May 21, 2014
Messages
19
Hi, I have a summary table similar to the one below. The worksheet has column headers with multiple criteria consolidating into the single row criteria.

FCSTActual
OctoberOctober
20172017
Account 1
Account 2
Account 3
Account 4

<tbody>
</tbody>

The data is located in something such as the example below and includes all months for both FCST and Actual.
FCSTFCSTActualActual
OctoberNovemberOctoberNovember
2017201720172017
Account 162211068
Account 135326265
Account 132122838
Account 294246354
Account 282359265
Account 282954557
Account 3
Account 3
Account 3
Account 4
Account 4
Account 4

<tbody>
</tbody>

What formula is best to be used in this situation? I have tried hlookup, concantenate, and sumifs. I cant seem to get it right. I had it solved in the past, but cant seem to remember.

In general, I am wanting to summarize the account data by consolidating the accounts based on the matching headers,
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Let's assume the following...

A1:E15

FCSTFCSTActualActual
OctoberNovemberOctoberNovember
2017201720172017
Account 162211068
Account 135326265
Account 132122838
Account 294246354
Account 282359265
Account 282954557
Account 3
Account 3
Account 3
Account 4
Account 4
Account 4

<tbody>
</tbody>

G1:I7

FCSTActual
OctoberOctober
20172017
Account 1129100
Account 2258200
Account 300
Account 400

<tbody>
</tbody>


Then try...

H4, confirmed with CONTROL+SHIFT+ENTER, copied down and across:

=SUMIF($A$4:$A$15,$G4,INDEX($B$4:$E$15,0,MATCH(1,IF($B$1:$E$1=H$1,IF($B$2:$E$2=H$2,IF($B$3:$E$3=H$3,1))),0)))

Hope this helps!
 
Upvote 0
As I stated in my post, the formula must be confirmed with CONTROL+SHIFT+ENTER, not just ENTER. If done correctly, Excel will automatically place braces {...} around the formula.
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,370
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