Excel复制字符之间的字符串部分 [英] Excel copying part of a string between characters

查看:384
本文介绍了Excel复制字符之间的字符串部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在Excel中的某些字符之间返回字符串的一部分?例如我的字符串如下所示:

 `switchrefid` = {switchrefid:} 

我需要在'(撇号)之间剪切字符串的一部分,这样它只返回开关自举



/ p>

提前感谢。

解决方案

只要`字符在数据中完全出现两次,就可以执行以下操作:

  = LEFT(RIGHT(A1,LEN(A1)-FIND(`,A1)),FIND(`,RIGHT(A1,LEN(A1) (`,A1))) -  1)

虽然很可怕! >

(编辑:这个假设您的数据在A1中,当然)。


Is there a way of returning part of a string between certain characters in excel? For example my string looks like this:

`switchrefid` = {switchrefid: }

I need to cut the part of the string between the ' (apostrophes) so it just returns switchrefid

I'm sure there must be a formula for this i just cant think of the one to use.

Thanks in advance.

解决方案

As long as the ``` characters occur exactly twice in your data, you can do:

=LEFT(RIGHT(A1, LEN(A1)-FIND("`", A1)), FIND("`",RIGHT(A1, LEN(A1)-FIND("`", A1)))-1)

Although it is pretty horrible!

(Edit: this assumes your data is in A1, of course.)

这篇关于Excel复制字符之间的字符串部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆