ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Format date as text (https://www.excelbanter.com/excel-worksheet-functions/137456-format-date-text.html)

Invalid

Format date as text
 
I have a spreadsheet with columns of dates and times. I need to combine
them into a common cell. For example, I have columns A and B, and want to
generate C::

A B C
1/1 4:00 1/1-4:00
1/2 4:15 1/2-4:15
1/3 4:25 1/3-4:25

When I use =concatenate(a1,"-",b1) in column C I get:
39083-0.195833333333333
39084-0.196527777777778
39085-0.197222222222222


I've tried TEXT(), but can't figure out what text format string to use. I
also tried formatting column C as Text - didn't work

I've searched this newsgroup and the MS knowledgebase to no avail. Can
anyone help?

Thanks,
Bob



MH[_2_]

Format date as text
 
Have you tried:

=TEXT(A1+B1,"m/d-h:mm")

MH

"Invalid" wrote in message
...
I have a spreadsheet with columns of dates and times. I need to combine
them into a common cell. For example, I have columns A and B, and want to
generate C::

A B C
1/1 4:00 1/1-4:00
1/2 4:15 1/2-4:15
1/3 4:25 1/3-4:25

When I use =concatenate(a1,"-",b1) in column C I get:
39083-0.195833333333333
39084-0.196527777777778
39085-0.197222222222222


I've tried TEXT(), but can't figure out what text format string to use. I
also tried formatting column C as Text - didn't work

I've searched this newsgroup and the MS knowledgebase to no avail. Can
anyone help?

Thanks,
Bob




T. Valko

Format date as text
 
Try this:

=TEXT(A1+B1,"m/d-h:mm")

Biff

"Invalid" wrote in message
...
I have a spreadsheet with columns of dates and times. I need to combine
them into a common cell. For example, I have columns A and B, and want to
generate C::

A B C
1/1 4:00 1/1-4:00
1/2 4:15 1/2-4:15
1/3 4:25 1/3-4:25

When I use =concatenate(a1,"-",b1) in column C I get:
39083-0.195833333333333
39084-0.196527777777778
39085-0.197222222222222


I've tried TEXT(), but can't figure out what text format string to use. I
also tried formatting column C as Text - didn't work

I've searched this newsgroup and the MS knowledgebase to no avail. Can
anyone help?

Thanks,
Bob




Invalid

Format date as text
 
Figured it out:

=CONCATENATE(TEXT(B2,"m/d")," - ",TEXT(C2,"h:mm"))

Sheesh!

"Invalid" wrote in message
...
I have a spreadsheet with columns of dates and times. I need to combine
them into a common cell. For example, I have columns A and B, and want to
generate C::

A B C
1/1 4:00 1/1-4:00
1/2 4:15 1/2-4:15
1/3 4:25 1/3-4:25

When I use =concatenate(a1,"-",b1) in column C I get:
39083-0.195833333333333
39084-0.196527777777778
39085-0.197222222222222


I've tried TEXT(), but can't figure out what text format string to use. I
also tried formatting column C as Text - didn't work

I've searched this newsgroup and the MS knowledgebase to no avail. Can
anyone help?

Thanks,
Bob




Teethless mama

Format date as text
 
Try this:

=A1+B1

Format cells as: m/d-h:mm






"Invalid" wrote:

I have a spreadsheet with columns of dates and times. I need to combine
them into a common cell. For example, I have columns A and B, and want to
generate C::

A B C
1/1 4:00 1/1-4:00
1/2 4:15 1/2-4:15
1/3 4:25 1/3-4:25

When I use =concatenate(a1,"-",b1) in column C I get:
39083-0.195833333333333
39084-0.196527777777778
39085-0.197222222222222


I've tried TEXT(), but can't figure out what text format string to use. I
also tried formatting column C as Text - didn't work

I've searched this newsgroup and the MS knowledgebase to no avail. Can
anyone help?

Thanks,
Bob





All times are GMT +1. The time now is 10:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com