从右侧将文本拆分为不同的列 [英] Split text into different columns from the right

查看:55
本文介绍了从右侧将文本拆分为不同的列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用v2016在Excel的一个单元格中有一串字母数字文本.文本类似于:

ECN 6120 012 MMR 12195 201481

我使用搜索",查找"和修剪"的变体将第一,第二,第三和最后一组文本放入单个单元格中.

I have a string of alpha-numeric text that is in one cell of Excel, using v2016. the text is similar to:

ECN 6120 012 MMR 12195 201481

I have used variants of the "search" and "find" and "trim" to get the 1st, 2nd, 3rd, and last groups of text into individual cells.

我需要倒数第二组数字,但由于有时不存在"MMR",因此需要从右侧获取. 有什么想法吗?

I need to get the second to last group of numbers but it needs to be grabbed from the right because the 'MMR' sometimes is not present. Any ideas?

推荐答案

使用 A1 中的数据,在 B1 中输入:

With data in A1, in B1 enter:

=TRIM(MID(SUBSTITUTE($A1," ",REPT(" ",999)),COLUMNS($A:A)*999-998,999))

并复制:

这篇关于从右侧将文本拆分为不同的列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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