Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
furmula to add hours
I have a cell (B3) that is a date formatted as 01/01/08 0:00:00
I want a formula in another cell (D3) that takes the value of B3 and adds time to it. eg. B3 - 01/01/08 00:00:00 D3 - 01/01/08 23:59:59 ?? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
furmula to add hours
Hi
Try =B3+TIME(23,59,59) Since time is stored as fractions of a day, you could also use =B3+3.5/24 to add 3 hours 30 minutes to the value in B3 -- Regards Roger Govier "Stephen" wrote in message ... I have a cell (B3) that is a date formatted as 01/01/08 0:00:00 I want a formula in another cell (D3) that takes the value of B3 and adds time to it. eg. B3 - 01/01/08 00:00:00 D3 - 01/01/08 23:59:59 ?? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
furmula to add hours
Dates are stored by Excel as a number with the format dddd.ttttt where dddd
is the number of days since 0-Jan-1900 and tttt is a fraction of a 24-hour day (e.g., 6:00 = 0.25, 12:00 = 0.5, 18:00 = 0.75, etc). Thus, you need to strip the date component off of the second datetime before adding it to the first. =A1+B1-INT(B1) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting LLC www.cpearson.com (email on the web site) "Stephen" wrote in message ... I have a cell (B3) that is a date formatted as 01/01/08 0:00:00 I want a formula in another cell (D3) that takes the value of B3 and adds time to it. eg. B3 - 01/01/08 00:00:00 D3 - 01/01/08 23:59:59 ?? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
furmula to add hours
Good stuff. thanks!
"Roger Govier" wrote: Hi Try =B3+TIME(23,59,59) Since time is stored as fractions of a day, you could also use =B3+3.5/24 to add 3 hours 30 minutes to the value in B3 -- Regards Roger Govier "Stephen" wrote in message ... I have a cell (B3) that is a date formatted as 01/01/08 0:00:00 I want a formula in another cell (D3) that takes the value of B3 and adds time to it. eg. B3 - 01/01/08 00:00:00 D3 - 01/01/08 23:59:59 ?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional Formating Furmula | Excel Discussion (Misc queries) | |||
I want to get a furmula for get a percentage | Excel Worksheet Functions | |||
Need furmula of R-squared by polynomial regression | Excel Programming | |||
Desperately needing furmula help | Excel Discussion (Misc queries) | |||
Issue creating a furmula in VBA, Please Help | Excel Programming |