Hi everyone - looking for some guidance with a formula I'm trying to write.

I have a portfolio sheet with multiple rows and the following ranges (among others, but these are the relevant ones):
rngTicker - ticker code / unique ID for the stock
rngPosition - whether that ticker is long or short (or has no position "=None")
rngValue - P&L for each ticker at the current date

In that sheet, I count the number of profitable trades in a formula like this:
=SUM(COUNTIFS(rngPosition,{"Long","Short","None"},rngValue,">0"))

I also sum the total profitable value of tickers with positions like this:
=SUM(SUMIFS(rngValue,rngPosition,{"Long","Short","None"},rngValue,">0"))
... and the non-profitable value has the condition "<0".

In another sheet (called Control) is a list of tickers to exclude from the P&L calculations - this is rngExclude.

I can count the number of values in rngTicker that are also in rngExclude with this formula:
=SUMPRODUCT(--(ISNUMBER(MATCH(rngTicker,rngExclude,0))))

But what I cannot work out is how to count and sum these ranges with the added condition that the ticker in rngTicker in the portfolio sheet does not exist in the rngExclude in the control sheet.

Any guidance on how to combine these would be appreciated. Thank you in advance.

MM.