I need help with an iteration to my existing formula where I need to add certain values within the same cell based on specific criteria.
Currently, I have cell H2 that has a plain text value like this:
GroupAct: Group Actuarial - Division~28*Group Sales Support - Division~2*Group Systems - Division~1*Group Underwriting - Division~4*Individual Life - Division~1*IT - Business Unit~1*--~3
[This is showing access group names, then a colon, then the divisions that are in that access group. The divisions are formatted by name, then a tilde, then how many people are in that division, then an asterisk, and repeat]
I then have an IF statement in cell I2 that looks for a specific text string and returns Yes or leaves the value blank:
So this returns Yes in column I for column H’s value
I am now being asked now to sum the numerical values following each instance of this specific text string being found in H2. So, in the above example:
- Find ‘: Group’ and the 28 after it
- Find the first ‘*Group’ and the 2 after it
- Find the second ‘*Group’ and the 1 after it
- Find the third ‘*Group’ and the 4 after it
- Add these values up to 35 and put that in cell I2 instead of just Yes.
I have looked at little at SUMPRODUCT, but I am not sure how that works as an array. Any help is appreciated to get me on the right track. Thanks!
Currently, I have cell H2 that has a plain text value like this:
GroupAct: Group Actuarial - Division~28*Group Sales Support - Division~2*Group Systems - Division~1*Group Underwriting - Division~4*Individual Life - Division~1*IT - Business Unit~1*--~3
[This is showing access group names, then a colon, then the divisions that are in that access group. The divisions are formatted by name, then a tilde, then how many people are in that division, then an asterisk, and repeat]
I then have an IF statement in cell I2 that looks for a specific text string and returns Yes or leaves the value blank:
Code:
=IF(ISNUMBER(SEARCH(": Group",H2)),"Yes",IF(ISNUMBER(SEARCH("*Group",H2)),"Yes",""))
I am now being asked now to sum the numerical values following each instance of this specific text string being found in H2. So, in the above example:
- Find ‘: Group’ and the 28 after it
- Find the first ‘*Group’ and the 2 after it
- Find the second ‘*Group’ and the 1 after it
- Find the third ‘*Group’ and the 4 after it
- Add these values up to 35 and put that in cell I2 instead of just Yes.
I have looked at little at SUMPRODUCT, but I am not sure how that works as an array. Any help is appreciated to get me on the right track. Thanks!