简体   繁体   English

Excel:如何将一个单元格的内容分为三个不同的单元格

[英]Excel: How to separate the content of a cell into 3 different cells

Excel question: I have a sheet where each cell consist of 3 number separated with a 'space'. Excel问题:我有一张工作表,其中每个单元格由3个数字组成,中间用“空格”分隔。 How do I separate the numbers in 3 different cells? 如何将数字分成3个不同的单元格? How do I do that without using Macros and VBA (I have an old Mac version)? 在不使用Macros和VBA的情况下该如何做(我有旧的Mac版本)?

This is simple in both Excel 2010 and 2013. See the picture. 在Excel 2010和2013中,这都很简单。 Use the delimited and then check the space. 使用定界符,然后检查空间。 You can also do in 2003 by importing the file. 您也可以在2003年导入文件。 在此处输入图片说明

With data in A1 , In B1 enter: 对于A1中的数据,在B1中输入:

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

and copy across: 并复制到:

在此处输入图片说明

It depends on whether the value is a real number (eg with SPACE as the digit grouping symbol), or is merely a text string. 这取决于该值是实数(例如,以SPACE作为数字分组符号)还是仅仅是文本字符串。 If it is a text string, then either of the two previously offered solutions will work. 如果是文本字符串,则可以使用之前提供的两种解决方案中的任何一种。

But if it is a real number, with SPACE for the digit grouping symbol, then try these formulas: 但是,如果它是一个实数,并且以SPACE表示数字分组符号,请尝试以下公式:

A1:  Your number  eg: 123 456 789

B1: =MOD($A$1,10^3)
C1: =MOD(INT($A$1/10^3),10^3)
D1: =MOD(INT($A$1/10^6),10^3)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM