Assuming that a given security could be assigned to more than one portfolio, and could have a different value in each portfolio, the easiest way to do this is to insert a helper column at C (your values will move over to column D), with a formula that concatenates column A and B.
Put a Vlookup in Column L (what is now Col L - will be Col M after the insertion mentioned above) that looks up the concatenated values in the helper column and the values column - see below. Note - the helper column doesn't have to be visible
in L3:
=SUMPRODUCT(($A$3:$A$20=$J$3)*($B$3:$B$20=$K$3),$C$3:$C$20)
though this will sum all the rows with the same Security/Portfolio combination, which is maybe what you want, otherwise, be sure that only one row has that combination in coliumns A:B.
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.