Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How to add time to a cell formatted as yyyymmddhhmmss
How can a number of hours be added to a cell and both the time and date
increment correctly? For example, A1 = 25, B1 = 0:00:00. I want to add A1 and B1 to get C1. The Custom format for C1 is yyyymmddhhmmss. Both the time and date need to change correctly. I'm using the following function in C1: B1 + TIME(A1,0,0) I realize I probably need a date function too but I do not know which one or how to use it to do what I need. The time is incremented correctly (0:59:00), but the date is incorrect. The date is 01/01/1900 but should be 01/02/1900. Any ideas? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How to add time to a cell formatted as yyyymmddhhmmss
When you use the TIME function, it will automatically roll-over
hours at 24:00:00. Thus TIME(25,0,0) gets rolled over to be the equivalent of TIME(1,0,0). Try =B1+(A1/24) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "JD" wrote in message oups.com... How can a number of hours be added to a cell and both the time and date increment correctly? For example, A1 = 25, B1 = 0:00:00. I want to add A1 and B1 to get C1. The Custom format for C1 is yyyymmddhhmmss. Both the time and date need to change correctly. I'm using the following function in C1: B1 + TIME(A1,0,0) I realize I probably need a date function too but I do not know which one or how to use it to do what I need. The time is incremented correctly (0:59:00), but the date is incorrect. The date is 01/01/1900 but should be 01/02/1900. Any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with this conditional IF statement | Excel Discussion (Misc queries) | |||
Urgent date/scheduling calc needed | Excel Worksheet Functions | |||
enter a time into a cell, have the cell show two times the entry | Excel Worksheet Functions | |||
Combined date time cell to separate date & time components | Excel Discussion (Misc queries) | |||
GET.CELL | Excel Worksheet Functions |