Forum Discussion
Zmichigan
May 28, 2024Copper Contributor
How do I repeat the same formula over multiple rows?
Each row in my table represents a separate grouping of cards, the numbers indicate which card is present in the grouping (e.g. 1= Card 1). I need to figure out how to check if two cards are present i...
- May 29, 2024
If you are using Excel for MS365 you can try this:
=SUM(--(BYROW(A2:K54,LAMBDA(r,--SUM(--(r={8;15}))>=2))))Perhaps not the most intuitive formula, but all it does is create, row-by-row, arrays of TRUEs and FALSEs. Then the -- turns these into ones and zeros that can be summed.
If you want to enter the Card parings in the worksheet, rater than hard-coding them in the formula enter then, let's say in N1 and N2 and than replace the {8;15} part with N1:N2
If you are not using 365, then I would use a helper column L. Enter your working formula in L2, copy it down and SUM it where you want the result to show up.
rachel
May 29, 2024Iron Contributor
Adding UNIQUE so that even if there is multiple 8 but no 15 in a given row the checks will still work: =SUM(--(BYROW(A5:K54,LAMBDA(r,--SUM(--(UNIQUE(r,TRUE,FALSE)={8;15}))>=2))))