Forum Discussion
How to simulate old array formulas that yield one result instead of spilling
- 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)
- Willy LauFeb 11, 2022Iron ContributorMay I know whether the function LEFT(A201:A210) works as your expectation while the number of character is not passed to the function?
- JMB17Feb 11, 2022Bronze Contributor
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)
- Detlef_LewinFeb 11, 2022Silver Contributor
It is in the support article for the function:
If num_chars is omitted, it is assumed to be 1.
- Willy LauFeb 11, 2022Iron Contributor
Yes, I know it.
But how can a 1-length string be equal to "CAPITAL"?
- Detlef_LewinFeb 10, 2022Silver Contributor
*
@ is the intersection operator
To be more precise:
SPACE is the intersection operator.
@ is the reference operator aka implicit intersection operator.