gpt4 book ai didi

excel - 如何在excel中将字符串分解为子字符串?

转载 作者:行者123 更新时间:2023-12-04 21:13:22 24 4
gpt4 key购买 nike

原始列是这样的:

0.45::rafas::4.0::0.0::0.9
0.35::rasaf::4.0::110.0::1.0

我想在Excel中将字符串分解为以下(::作为分隔符)
                             col1   col2   col3   col4   col5
0.45::rafas::4.0::0.0::0.9 0.45 rafas 4.0 0.0 0.9
0.35::rasaf::4.0::110.0::1.0 0.35 rasaf 4.0 110 1.0

请帮忙。

最佳答案

This page解释了如何使用“文本到列”功能来做到这一点。

为了您的方便,复制:

Highlight all of your cells with the data.

Select The Topmost Cell In The Column, E.G. A1 Hold CTRL+SHIFT And Then Press The Down Arrow. OK, Once We've Done That, Go To "Data" Menu And Select "Text To Columns". On The Text To Columns Window, Select "Delimited" And Then Hit "Next". In The Following Window, Choose "Other" For Type Of Delimiter And Use The Minus/Hyphen Sign - Hit Finish.

Now you will have two columns, from your example, the first column will contain data like "Animals" and the other column will contain the data " House of The Rising Sun". (note the SPACE in front of "House")

To get rid of that SPACE we're going to use the TRIM function.

In cell C1 (or the column to the right of the song titles) type in this formula.

=TRIM(B1)

Then double-click on that little black box on the excel cursor to copy the formula down the whole range. Any spaces at the Start or end of the text string will be removed.

关于excel - 如何在excel中将字符串分解为子字符串?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1387057/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com