and and or formula on excel

suiz919

New Member
Joined
Sep 16, 2011
Messages
23
Hi-Sorry in advance for such a long drawn out formula. I'm trying to create a formula which takes the weighted average of the costproceeds and ytw array when the asset class is either a "foreign government agency" or a "sovereign" bond and certain other parameters that i have here below in the formula but excludes portfolios like "ah pp", "ch select pp" and so forth. I think the formula below works well, but gives me an error when i add the "isnumber(match()" formula. Thank you in advance!

=SUMPRODUCT(--(PORTNAME<>"ah- pp")*(PORTNAME<>"ch select pp")*(PORTNAME<>"lex- pp")*(PORTNAME<>"nu- pp"),--(TRANTYPE=$B$1),--(REGION=$C$1),--(ISNUMBER(MATCH(PORTNAME={"foreign government agency";"sovereign"},0))),COSTPROCEEDS,YTW)/SUMPRODUCT(--(PORTNAME<>"ah- pp")*(PORTNAME<>"ch select pp")*(PORTNAME<>"lex- pp")*(PORTNAME<>"nu- pp"),--(TRANTYPE=$B$1),--(ISNUMBER(MATCH(PORTNAME={"foreign government";"sovereign"},0))),--(REGION=$C$1),COSTPROCEEDS)
 

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.
actually, i caught my own mistake. the change should be made to

--(ISNUMBER(MATCH(ACLASS4,{"foreign government agency";"sovereign"},0)))

Thanks anyway for all your help guys! You guys rock!
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,844
Members
452,948
Latest member
UsmanAli786

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