小编Mrs*_*min的帖子

从具有不同字符长度的单元格中提取数字

我有一组单元格,第一个字符串永远不会更改,它始终会(直到编码器更改它)20字符(inc空格).

然后我想从剩余的序列中提取3个数字(在某些情况下为2).

The monthly cost is 2 silver, 1 copper and 40 iron.
The monthly cost is 1 silver, 94 copper and 40 iron.
The monthly cost is 1 silver and 75 copper.
The monthly cost is 8 silver and 40 copper.
The monthly cost is 1 silver.
The monthly cost is 99 silver, 99 copper and 99 iron.
The monthly cost is 1 gold.
Run Code Online (Sandbox Code Playgroud)

在上面的示例中,您可以看到前20个字符后没有设置值.

1 or 99 silver 
1 or 99 copper
0, 1 or 99 …
Run Code Online (Sandbox Code Playgroud)

excel vba excel-vba excel-formula excel-2010

2
推荐指数
1
解决办法
632
查看次数

标签 统计

excel ×1

excel-2010 ×1

excel-formula ×1

excel-vba ×1

vba ×1