Say I have a string in cell A1 as this: TestA(2h)TestB(15h)TestC(4H), and I would like to extract the numbers and sum them up. For this example, I want 2 + 15 + 4 = 21. Is it possible to do this with only Excel formula and no VBA?
I currently have this array formula from another post but it won't quite work for this scenario (it gets 12 = 2 + 1 + 5 + 4).
Also, those numbers will always be surrounded by (xxh), xx means values.
Thanks,
Ian
I currently have this array formula from another post but it won't quite work for this scenario (it gets 12 = 2 + 1 + 5 + 4).
Code:
{=SUM(VALUE(MID(0&A1,LARGE(ISNUMBER(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))*ROW(INDIRECT("1:"&LEN(A1))),ROW(INDIRECT("1:"&LEN(A1))))+1,1)))}
Also, those numbers will always be surrounded by (xxh), xx means values.
Thanks,
Ian