Index Match & nested sum function

jlugo

Board Regular
Joined
Aug 12, 2011
Messages
146
Hi,

I'm trying to return the values of the intersection of column & row headers. The rows are not static, so cell reference would not be a good long term solution.

To make it simple, let's say we want to add 6001 + 6003 only:

[TABLE="class: cms_table, width: 554"]
<tbody>[TR]
[TD][/TD]
[TD]Acct[/TD]
[TD]January[/TD]
[TD]February[/TD]
[TD]March[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]INR[/TD]
[TD]6001[/TD]
[TD="align: right"]2,214[/TD]
[TD="align: right"]1,757[/TD]
[TD="align: right"](431)[/TD]
[/TR]
[TR]
[TD]GBP[/TD]
[TD]6002[/TD]
[TD="align: right"]1,203[/TD]
[TD][/TD]
[TD="align: right"]1,568[/TD]
[/TR]
[TR]
[TD]Gain/Loss[/TD]
[TD]6003[/TD]
[TD][/TD]
[TD="align: right"]778[/TD]
[TD="align: right"]88[/TD]
[/TR]
</tbody>[/TABLE]


Desired results:
6001 + 6003 = desired results (6002 is skipped)

January = (2,214 + 0) = 2,214
February = (1,757 + 778) = 2,535
March = (-431 +88) = -423

What function(s) scans the column headers & row headers (in case they move) to add up those amounts if they intersect? The goal is the perform this calculation for each month.

Thanks for your help!
 
Hi jlugo.

Does this work for you?...

Excel Workbook
ABCDEFGHIJ
1AcctJanuaryFebruaryMarchCriteria1Criteria2Result
2INR60012,2141,757-431GBPAcct6002
3GBP60021,2031,5686002
4Gain/Loss600377888
5
Sheet3


If this is not the solution you require, then take a look here....

excelisfun -- Excel How To Videos - YouTube

Mike has plenty of excellent videos that may be of help.

Good luck.

Ak
 
Upvote 0
HI Akashwani,

Actually, I'm a big fan of youtube video and I already am a subscriber to Exceisfun. He even made me a video once :)

You are close!

Note - 6002 is being skipped altogether. Not part of the criteria.

Criteria 1= January, Criteria 2 = INR, Criteria 3 = GBP, So then add criteria 2 + 3 = desired result

Thanks for your help.
 
Last edited:
Upvote 0

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