vtj808
vtj808

Reputation: 63

Sum up cells based on conditions

I appreciate this could be treated as a simple question. I have been trying to figure out where I'm going wrong as I'm sure it is something simple ... from the Strategy Exposures tab you can see that his strategies are either macro or tactical I have a table (below) and have been asked to to sum up the required exposure for Macro and for Tactical depending on what is there. I want to create two separate cells. One which adds up 'Macro', and the other which adds up 'tactical'.

Strategy    ExposureDescription ExposureRequired (USD)
EUR_MACRO       DAX INDEX        2,000,000
EUR_MACRO       FTSE INDEX       4,000,000
EUR_MACRO       CAC40 INDEX      1,100,000
EUR_MACRO       S&P INDEX       10,000,000
JPY_MACRO       NKY INDEX        4,000,000
JPY_MACRO       S&P INDEX       34,000,000
USD_TACTICAL    S&P INDEX        4,000,000
JPY_TACTICAL    NKY INDEX        6,000,000
JPY_MACRO       S&P INDEX        3,000,000

Currently, I have tried variations of: =SUMIF(B$3:B$11,"*MACRO*",D$3:D$11) however this formula keeps giving an output of 0. Table ranges from (diagonally) B2 - D11.

Upvotes: 0

Views: 59

Answers (1)

vtj808
vtj808

Reputation: 63

So it turns out after all of this, the SumIF function was working okay when we created a new workbook with brand new data. This prompted me to close down the current sheet which I was having formula issues with, disable the macros and re-try. It worked a charm. I have never experienced this before however as @brucewayne suggested, their must've been some conflict based on one of the macros. Unsure what yet, will look into this and see if I can figure it out. If I do will post more. Hope this helps someone.

Upvotes: 1

Related Questions