简体   繁体   中英

Excel - Formula to join 2 cells into one, but one is in date format

In my Excel there are 2 columns with data values. 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.

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

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