3

我有一个像这样的A1中的数据的 Excel 表2013-05-24 16:55:04,我想留下时间,hh:mm:ss 字符串的一部分。

有没有办法我可以在单元格B1中写类似的东西= cut first 11 chars off A1

4

6 回答 6

7

如果它被存储为文本,那么

=MID(A1,12,LEN(A1)-11)

会工作

如果它是日期/时间值,那么你有

=A1-INT(A1)

将值作为数字返回,或

=TEXT(A1,"hh:mm:ss")

将值作为文本返回

于 2013-06-19T18:54:06.703 回答
4

If the string you have is really a date/time, you might be better off with:

=TEXT(A1, "hh:mm:ss")
于 2013-06-19T18:53:18.370 回答
2

如果您将 *_(星号空格)替换为空,会发生什么?

于 2013-06-20T10:56:00.327 回答
0

You can use the MID or RIGHT function. MID would be better, I think. The syntax would be something like: =MID(A1,12,LEN(A1)-11.

How the formula works

MID takes 3 arguments:

  • the input string, or a reference to a cell that contains the input string

  • the starting character that MID will return

  • the number of characters to return.

So, A1 holds the input string, the first character to return is the 12th one (skipping the first 11), and the length of the string to return is just the length of the complete string minus the 11 characters that are being skipped.

于 2013-06-19T18:50:47.890 回答
0

This should work

=RIGHT(A1,LEN(A1)-11)

于 2013-06-19T18:51:23.840 回答
0

Try the MID function explained here

If you can't be bothered to read that, here's the syntax

= MID ( Text , Start_num , Num_chars )

于 2013-06-19T18:53:00.490 回答