Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In my spreadsheet, I have column A defined as format "time". There, I
insert values like: 0:00 13:20 7:30 etc. In column B I have the formulae: =A1+8.5 =A2+8.5 etc. (I want to add 8 1/2 hours to the start time.) However, I'm not getting what I would expect. I would expect to see: 0:00 8:30 13:20 23:50 7:30 16:00 But instead I'm seeing: 0:00 12:00 13:20 1:20 7:30 19:30 What am I doing wrong? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=A1+(8.5/24)
Time in Excel is stored as a fraction of a day -- Kind regards, Niek Otten Microsoft MVP - Excel "accelerator" wrote in message oups.com... In my spreadsheet, I have column A defined as format "time". There, I insert values like: 0:00 13:20 7:30 etc. In column B I have the formulae: =A1+8.5 =A2+8.5 etc. (I want to add 8 1/2 hours to the start time.) However, I'm not getting what I would expect. I would expect to see: 0:00 8:30 13:20 23:50 7:30 16:00 But instead I'm seeing: 0:00 12:00 13:20 1:20 7:30 19:30 What am I doing wrong? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks! I wish I could have found that easily in the help (some
examples would be nice) |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi accelerator,
Try this site out. http://www.cpearson.com/excel/datearith.htm This does work for sure. Terry |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I also noticed, that although I set the format to UTC (e.g. 13:30),
when I enter 12:00 it assumes that it is midnight and not mid-day. When I enter 12:00 it displays 0:00! |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
an alternative is to add a time value
=A1+Timevalue("8:30") -- Regards, Tom Ogilvy "accelerator" wrote in message oups.com... In my spreadsheet, I have column A defined as format "time". There, I insert values like: 0:00 13:20 7:30 etc. In column B I have the formulae: =A1+8.5 =A2+8.5 etc. (I want to add 8 1/2 hours to the start time.) However, I'm not getting what I would expect. I would expect to see: 0:00 8:30 13:20 23:50 7:30 16:00 But instead I'm seeing: 0:00 12:00 13:20 1:20 7:30 19:30 What am I doing wrong? |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I couldn't duplicate that behavior in xl2003. In tools
=Options=Transition, do you have anything selected in the checkboxes on that dialog. If so, try unchecking them. -- Regards, Tom Ogilvy "accelerator" wrote in message oups.com... I also noticed, that although I set the format to UTC (e.g. 13:30), when I enter 12:00 it assumes that it is midnight and not mid-day. When I enter 12:00 it displays 0:00! |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OK -- Now how can I place a date in a cell as text but with a specific
format? e.g. cell a1, formatted as date, currently displays 21/10/05 I want to place (via vba) this date as text in cell a2, but I want it to look like 21 Oct 2005 or October 21, 2005 |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try this
With Range("a1") ..NumberFormat = "MMMM DD, YYYY" End With -- Gary "accelerator" wrote in message oups.com... OK -- Now how can I place a date in a cell as text but with a specific format? e.g. cell a1, formatted as date, currently displays 21/10/05 I want to place (via vba) this date as text in cell a2, but I want it to look like 21 Oct 2005 or October 21, 2005 |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That didn't do it. I used the code:
Sub test() Range("b1") = Range("a1").Value With Range("b1") ..NumberFormat = "MMMM DD, YYYY" End With but when I changed the format of the cell to text, I see: 38646 How can I convert the date to the above format, then copy the results, *as text*, to another cell, formatted as text? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How calculate end time with beginning time plus formula minutes | Excel Worksheet Functions | |||
Formula Calculate after a certain time of day. | Excel Discussion (Misc queries) | |||
Formula to calculate over-time | Excel Discussion (Misc queries) | |||
Formula to calculate time | Excel Discussion (Misc queries) | |||
How do I set up a formula on a time sheet to calculate time in 1/. | Excel Discussion (Misc queries) |