if(B8=="库存金额",INDEXOFARRAY(SPLIT(E8,','),len(SPLIT(E8,',')-1)),sum(E8))
试试
INDEXOFARRAY(REVERSEARRAY(split(E8,",")),1)
INDEXOFARRAY(split(E8,","),2)