获取数字2和3之间的定界符 [英] Get data between number two and three delimiter

查看:44
本文介绍了获取数字2和3之间的定界符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有很多人,每个人都有这样一条线.

I have a large list of people where each person has a line like this.

Bill Gates, IT Manager, Microsoft, <https://www.linkedin.com/in/williamhgates>

我想在特定单元格中提取公司名称.在此示例中,将是Microsoft,它位于第二个和第三个定界符之间(在这种情况下,定界符为," ).我该怎么办?

I want to extract the company name in a specific cell. In this example, it would be Microsoft, which is between the second and third delimiters (in this case, the delimiter is ", "). How can I do this?

现在我正在使用split方法( = SPLIT(A2,,",false)).但这给了我四个不同的信息单元.我只想在一个单元格中输出公司的命令.有人可以帮忙吗?我尝试了不同的方法,但是似乎找不到任何有效的方法.

Right now I'm using the split method (=SPLIT(A2, ", ",false)). But it gives me four different cells with information. I would like a command only to output the company in one cell. Can anyone help? I have tried different things, but I can't seem to find anything that works.

也许某些正则表达式可以做到这一点,但我不喜欢正则表达式.

Maybe some regex can do it, but I'm not into regex.

推荐答案

简短答案

使用INDEX和SPLIT获取两个分隔符之间的值.例子

Short answer

Use INDEX and SPLIT to get the value between two separators. Example

=INDEX(SPLIT(A1,", ",FALSE),2)

支出

  • SPLIT返回一个1 x n的数组.
  • INDEX的第一个参数可以是范围或数组.
  • INDEX的第二个和第三个参数是可选的.如果第一个参数是只有一行或一列的数组,则将假定第二个参数对应于数组的较大侧,因此无需使用第三个参数.
  • 这篇关于获取数字2和3之间的定界符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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