简体   繁体   English

替换和删除部分单元格文本

[英]Replace and delete part of a cell text

I have an excel spreadsheet that was exported from some software... it uses code that it understands, which makes sense, but the problem is that the output isn't always best for us humans for a quick visual.我有一个从某些软件导出的 excel 电子表格......它使用它理解的代码,这是有道理的,但问题是 output 并不总是最适合我们人类快速视觉。 Especially when a person isn't accustomed to actually reading it.尤其是当一个人不习惯实际阅读它时。

Proof in point:证明点:

This is in cell column H:这是在单元格列 H 中:

2020-04-01T11:28:18+00:00

Now, I could create an excel formula that replaces every instance manually, but what I want to do is make is to that the T and everything right of is goes the way of the dodo.现在,我可以创建一个手动替换每个实例的 excel 公式,但我想做的是使 T 和所有正确的东西都按照渡渡鸟的方式进行。

I know that there is a substitute command in Excel, but it only would do the first, I forget if there is a way to actually make it so that it will ignore the text to the right, and just take it from the T to 14 steps right and delete it so that all that is left is the Year, day and month.我知道Excel中有一个替代命令,但它只会做第一个,我忘了是否有办法真正做到它会忽略右边的文本,只是把它从T到14向右移动并删除它,剩下的就是年、日和月。 I will use Excel VBA if need be, but I'd rather it be a formula if possible that I can use for a copy and paste in another sheet for readable output.如果需要,我将使用 Excel VBA,但如果可能的话,我宁愿它是一个公式,我可以使用它来复制并粘贴到另一张纸上,以便阅读 output。

Thanks in advance.提前致谢。

With data in H1 , in I1 enter:使用H1中的数据,在I1中输入:

=Left(H1,10)

You don't need to locate the T because its position is fixed.您不需要找到T ,因为它的 position 是固定的。

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

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