![]() |
How to stop time format changing when I merge cell contents?
I am trying to merge to time cells, (both set to English (United States),
Time Type 13:30) both cells display correctly where I entered them (9:00 and 9:45) but when I merge the cell contents using the function =A4&" - "&B4 I get the result 0.375 - 0.406 instead of 9:00 - 9:45 as expected. The destination cell has the same time settings as the two original cells. How do I stop the times converting to decimals and get them to display the way I want them too? |
How to stop time format changing when I merge cell contents?
=TEXT(A4,"hh:mm") & " - " & TEXT(B4,"hh:mm")
Gord Dibben MS Excel MVP On Tue, 6 Apr 2010 11:02:20 -0700, CatKween wrote: I am trying to merge to time cells, (both set to English (United States), Time Type 13:30) both cells display correctly where I entered them (9:00 and 9:45) but when I merge the cell contents using the function =A4&" - "&B4 I get the result 0.375 - 0.406 instead of 9:00 - 9:45 as expected. The destination cell has the same time settings as the two original cells. How do I stop the times converting to decimals and get them to display the way I want them too? |
How to stop time format changing when I merge cell contents?
=TEXT(A4,"hh:mm") & " - " & TEXT(B4,"hh:mm")
-- Hope this helps. If it does, please click the Yes button. Thanks in advance for your feedback. Gary Brown "CatKween" wrote: I am trying to merge to time cells, (both set to English (United States), Time Type 13:30) both cells display correctly where I entered them (9:00 and 9:45) but when I merge the cell contents using the function =A4&" - "&B4 I get the result 0.375 - 0.406 instead of 9:00 - 9:45 as expected. The destination cell has the same time settings as the two original cells. How do I stop the times converting to decimals and get them to display the way I want them too? |
How to stop time format changing when I merge cell contents?
Gordon has given you the correct answer (as always).
Here is the reason for it: Excel stores dates as serial numbers and times as factions of a 24-hr day (is there any other type <gr?) So A1&"-"&B1 will display: number "-" number rather than time "-" time best wishes -- Bernard Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme "CatKween" wrote in message ... I am trying to merge to time cells, (both set to English (United States), Time Type 13:30) both cells display correctly where I entered them (9:00 and 9:45) but when I merge the cell contents using the function =A4&" - "&B4 I get the result 0.375 - 0.406 instead of 9:00 - 9:45 as expected. The destination cell has the same time settings as the two original cells. How do I stop the times converting to decimals and get them to display the way I want them too? |
All times are GMT +1. The time now is 02:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com