Forum Discussion

Zmichigan's avatar
Zmichigan
Copper Contributor
May 28, 2024
Solved

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...
  • Riny_van_Eekelen's avatar
    May 29, 2024

    Zmichigan 

    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.

Resources