Sum Data in Multiple Columns

hblais

New Member
Joined
Dec 8, 2016
Messages
1
I have an excel sheet with about 250 columns worth of data (A:IQ). Column A contains a unique value/header (9025 rows), and then each column (B:IQ) contains data associated with/for that value. This data is a combination of a year with a dollar amount for that year in the immediate column to the right. A single value from column A may have the same year in multiple columns, with different corresponding dollar amounts (a single column does not contain the same year all the way down).

I would like to perform a calculation that adds up the dollar value associated each year in the column to the left of the dollar value, so that for each row, I have a single dollar amount for each year. Since I am reading across the row, I know I can’t use a sumif function. At this point, I am at a loss of how to get this calculation. Sample data and the ideal results are below. Any thoughts/guidance are sincerely appreciated.


Example:
Source File
Title (A) Year (B) Amount (C) Year (D) Amount Year(F) Amount(G)
NAME 1 2011 100 2011 125 2013 50
NAME 2 2011 50 2012 50 2012 100
NAME 3 2012 100 2013 25 2013 100

Desired Result:
Title(A) 2011(B) 2012(C) 2013(D) 2014(E) 2015(F)
NAME 1 225 0 0 0 0
NAME 2 50 150 0 0 0
NAME 3 0 100 125 0 0
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
maybe something like...

Excel 2013
ABCDEFG
1TitleYearAmountYearAmountYearAmount
2NAME120111002011125201350
3NAME22011502012502012100
4NAME32012100201325201310
5
620112012201320142015
7Name122505000
8Name250150000
9Name301003500

<tbody>
</tbody>
Sheet1

Array Formulas
CellFormula
B7{=SUM(IF($A$2:$A$4=$A7,IF($B$2:$F$4=B$6,$C$2:$G$4)))}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

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