[英]Excel - Formula to join 2 cells into one, but one is in date format
In my Excel there are 2 columns with data values. 在我的Excel中,有2列带有数据值。 One have date and another have a string of numbers. 一个有日期,另一个有一串数字。
| 2019-01-25 | 114589 |
In the next column, I have a formula which will join the 2 together. 在下一列中,我有一个公式,它将2结合在一起。
Formula:
=C2&", "&D2
What I expected:
| 2019-01-25, 114589 |
What I got:
| 43490, 114589 |
This formula worked fine if both columns were using text and numbers. 如果两个列都使用文本和数字,则此公式效果很好。 But now that date is involved, it cannot work and the date reverts to number format, even when the cell format is set to date. 但是现在涉及到日期了,即使单元格格式设置为日期,日期也无法使用,并且日期会恢复为数字格式。 How to tell the cell to give me my data as a string? 如何告诉单元格将我的数据作为字符串提供给我?
尝试:
=TEXT(C2,"yyyy-mm-dd, ")&D2
您可以尝试:
=TEXT(C2,"yyyy-mm-dd") & " " & D2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.