我有一个像这样的A1中的数据的 Excel 表2013-05-24 16:55:04
,我想留下时间,hh:mm:ss 字符串的一部分。
有没有办法我可以在单元格B1中写类似的东西= cut first 11 chars off A1
?
我有一个像这样的A1中的数据的 Excel 表2013-05-24 16:55:04
,我想留下时间,hh:mm:ss 字符串的一部分。
有没有办法我可以在单元格B1中写类似的东西= cut first 11 chars off A1
?
如果它被存储为文本,那么
=MID(A1,12,LEN(A1)-11)
会工作
如果它是日期/时间值,那么你有
=A1-INT(A1)
将值作为数字返回,或
=TEXT(A1,"hh:mm:ss")
将值作为文本返回
If the string you have is really a date/time, you might be better off with:
=TEXT(A1, "hh:mm:ss")
如果您将 *_(星号空格)替换为空,会发生什么?
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
.
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.
This should work
=RIGHT(A1,LEN(A1)-11)
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 )