Forum Discussion

radinhj's avatar
radinhj
Copper Contributor
Feb 10, 2022
Solved

How to simulate old array formulas that yield one result instead of spilling

How to implement the following SUM(IF(LEFT(A201:A210)="CAPITAL",C201:C210,0))   which will add values in C201 through C210 when A201 through A210 has the value "CAPITAL"
  • JMB17's avatar
    JMB17
    Feb 11, 2022

    It should be Left(A201:A210, 7). If omitted, it defaults to one - I just copied the existing formula and did not catch that. But, to be honest, I'm not sure I entirely understand the question. It does not appear the existing formula should spill, with the sum function.

     

    Perhaps this is closer to what you are trying do?
    =IF(LEFT(@A201:A210, 7)="CAPITAL",@C201:C210,0)

     

    Or, perhaps enter the existing formula with Ctrl+Shift+Enter, or replace sum with sumproduct?

    SUMPRODUCT(--(LEFT(A201:A210, 7)="CAPITAL"),C201:C210)

Resources