I have each row of data organized in column pairs. In my example below, the column pairs would be A:B, C:D, E:F, G:H
and the pattern would continue.
- The first column in each pair contains
"PlayerStat:<statName>"
a string composed of"PlayerStat:"
and astatName
value which is itself a string such as"MaxHealth
,"Damage"
,"PhysicalResistance"
, etc. - The second column in each pair contains
"exp;<n1>;<n2>;<n3>"
a string composed of"exp;"
and three numbersn
each delimited by semi-colons.
Example Row
A | B | C | D | E | F | G | H | |
---|---|---|---|---|---|---|---|---|
1 | PlayerStat:MaxHealth | exp;1;1;100 | PlayerStat:MaxHealth | exp;1;1;1000 | PlayerStat:MaxHealth | exp;1;2;10000 | PlayerStat:Damage | exp;1;1000;235 |
I want to SUM all the n3
values where statName="MaxHealth"
. So for this example, it'd be "100+1000+10000 = 11100" (highlighted in blue font in the screenshot above).
Note: Can't change the values and the blue font is just for the purposes of this example.
Some of the approaches I tried are shown below.
=INDEX(A1:H1, 0, MATCH("PlayerStat:MaxHealth", A1:H1, 0) + 1)
=INDEX(SPLIT(B4, ";"), 0, 4)
=FILTER(A1:H1, "PlayerStat:MaxHealth"=A1:H1)