简体   繁体   中英

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. Especially when a person isn't accustomed to actually reading it.

Proof in point:

This is in cell column 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.

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. 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.

Thanks in advance.

With data in H1 , in I1 enter:

=Left(H1,10)

You don't need to locate the T because its position is fixed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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