Advanced text function
It seems somewhat expensive, but most interesting nonetheless. Nice one
Harlan!
In article .com,
"Harlan Grove" wrote:
Domenic wrote...
Let's assume the following...
A2 contains A/BBB/CA
B2 contains 20/30/50
C2 contains 50
Let E1:G1 contain A, BBB, and CA
Now, define the following...
...
Could be done without XLM, but the formulas would be longer. Define n
as, say, 255 and v as
=ROW(INDEX(Sheet1!$1:$65536,1,1):INDEX(Sheet1!$1:$ 65536,n,1))
Then enter the following array formula in cell D2.
=INDEX(MID($B2,SMALL(IF(MID("/"&$B2,v,1)="/",v),v),
SMALL(IF(MID($B2&"/",v,1)="/",v),v)-SMALL(IF(MID("/"&$B2,v,1)="/",
v),v)),MATCH(D$1,MID($A2,SMALL(IF(MID("/"&$A2,v,1)="/",v),v),
SMALL(IF(MID($A2&"/",v,1)="/",v),v)-SMALL(IF(MID("/"&$A2,v,1)="/",
v),v)),0))*$C2/100
|