Hi all,
I am using a formula which uses LEN and SUBSTITUTE. The formula works (I didn't learn it by building up, I got it from a tutorial), and I understand what LEN and SUBSTITUTE do separately, however, I don't understand what they are doing in this formula.
I was hoping anyone would explain it in very basic terms? As much as I like that the formula works, I want to also start to understand why the formulas do what they do so that I can begin to become more self-productive in building up formulas as I understand the logic.
Without further ado:
=SUMPRODUCT((LEN($J$2:$J$549)-LEN(SUBSTITUTE($J$2:$J$549, $A2, "")))/LEN($A2))
I use this formula for my lottery syndicate. It counts all the winning numbers from that game (J2:J549) for example, finding the number "01" (A2) in 01-16-23-28-29-(14). I don't understand what LEN and SUBSTITUTE are doing here to accurately sum up and display the frequency that these numbers show up. Especially the minus (-) and divide (/) segments.
I am using a formula which uses LEN and SUBSTITUTE. The formula works (I didn't learn it by building up, I got it from a tutorial), and I understand what LEN and SUBSTITUTE do separately, however, I don't understand what they are doing in this formula.
I was hoping anyone would explain it in very basic terms? As much as I like that the formula works, I want to also start to understand why the formulas do what they do so that I can begin to become more self-productive in building up formulas as I understand the logic.
Without further ado:
=SUMPRODUCT((LEN($J$2:$J$549)-LEN(SUBSTITUTE($J$2:$J$549, $A2, "")))/LEN($A2))
I use this formula for my lottery syndicate. It counts all the winning numbers from that game (J2:J549) for example, finding the number "01" (A2) in 01-16-23-28-29-(14). I don't understand what LEN and SUBSTITUTE are doing here to accurately sum up and display the frequency that these numbers show up. Especially the minus (-) and divide (/) segments.