SOLVED
Home

Autofill date time series keeps subtracting minutes?

%3CLINGO-SUB%20id%3D%22lingo-sub-634517%22%20slang%3D%22en-US%22%3EAutofill%20date%20time%20series%20keeps%20subtracting%20minutes%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-634517%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20am%20creating%20a%20date%20time%20series%20for%20every%20hour%2C%20for%20the%20years%202000-2019%20in%20a%20column.%26nbsp%3B%20I%20start%20by%20typing%20in%20the%20first%20cell%3A%20%3CSTRONG%3E1%2F1%2F2000%200%3A00%3C%2FSTRONG%3E%2C%20which%20has%20a%20custom%20format%20of%20m%2Fd%2Fyyyy%20h%3Amm.%26nbsp%3B%20I%20want%20the%20cells%20to%20show%20the%20format%20month%2Fday%2Fyear%20with%200%3A00-23%3A00%20hours.%20I%20drag%20the%20cells%20to%20fill%20the%20series%20down%20the%20column%2C%20this%20results%20in%20cells%20for%20each%20of%20the%2024%20hours%20in%20each%20day%20(screenshot%20below).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20problem%20is%20that%20I%20am%20losing%201%20minute%20at%20row%20102%2C%20and%20after%20this%20I%20keep%20losing%201%20minute%20after%20every%2012000%20rows.%20Basically%2C%20every%201.37%20years%20I%20lose%201%20minute.%26nbsp%3B%26nbsp%3B%20In%20the%20screenshot%2C%20after%20%3CSTRONG%3E1%2F5%2F2000%203%3A00%3C%2FSTRONG%3E%20the%20following%20cell%20is%20%3CSTRONG%3E1%2F5%2F2000%203%3A59%20(instead%20of%20showing%20time%204%3A00)%3C%2FSTRONG%3E.%20Instead%20of%20displaying%20%3CU%3Eon%20the%20hour%3C%2FU%3E%2C%20it%20shows%20%3CU%3E1%20minute%20less%3C%2FU%3E.%26nbsp%3B%20This%20happens%20again%20on%20%3CSTRONG%3E5%2F19%2F2001%202%3A59%3C%2FSTRONG%3E%2C%20with%20the%20following%20cell%20time%20changed%20to%20%3CSTRONG%3E3%3A58%3C%2FSTRONG%3E.%26nbsp%3B%20Losing%20another%20minute.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECould%20this%20be%20a%20bug%3F%20I%20don't%20know%20if%20it%20is%20leap%20year%20related%2C%20or%20why%20Excel%20is%20automatically%20changing%20the%20time%20series.%20I%20just%20want%20to%20keep%20the%20hourly%20format%200%3A00%20to%2023%3A00.%3C%2FP%3E%3CP%3EI'm%20using%20Excel%20MS%20Office%20Professional%20Plus%202019%2C%20Windows%2010%20operating%20system.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20any%20advice!%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F115703i99239313E84641E7%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Excel_Timequestion.PNG%22%20title%3D%22Excel_Timequestion.PNG%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EDate%20Time%20series%20changes%20by%201%20minute%20starting%20at%20row%20102%2C%20and%20then%20every%2012000%20rows%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-634517%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-635834%22%20slang%3D%22en-US%22%3ERe%3A%20Autofill%20date%20time%20series%20keeps%20subtracting%20minutes%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-635834%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F346816%22%20target%3D%22_blank%22%3E%40em12345%3C%2FA%3E%26nbsp%3B%2C%20that%20is%20floating%20point%20error%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-ca%2Fhelp%2F78113%2Ffloating-point-arithmetic-may-give-inaccurate-results-in-excel%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.microsoft.com%2Fen-ca%2Fhelp%2F78113%2Ffloating-point-arithmetic-may-give-inaccurate-results-in-excel%3C%2FA%3E%26nbsp%3Bsince%20datetime%20value%20in%20Excel%20is%20actually%20just%20number%2C%20more%20about%20that%20is%20here%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.myonlinetraininghub.com%2Fexcel-date-and-time%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.myonlinetraininghub.com%2Fexcel-date-and-time%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20workaround%20you%20may%20type%20your%20initial%20date%20time%20in%20first%20cell%2C%20let%20say%20A1%2C%20in%20A2%20add%20the%20formula%3C%2FP%3E%0A%3CPRE%3E%3DMROUND(A1%2B1%2F24%2C%2201%3A00%22)%3C%2FPRE%3E%0A%3CP%3Eand%20copy%20A2%20down%20till%20end%20of%20your%20range%20(drag%20down%20or%20select%20the%20range%20starting%20from%20A2%20and%20Ctrl%2BD)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-638850%22%20slang%3D%22en-US%22%3ERe%3A%20Autofill%20date%20time%20series%20keeps%20subtracting%20minutes%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-638850%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20the%20info%20and%20reference%20to%20these%20articles%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%20!%3C%2FP%3E%3CP%3EI%20wish%20Excel%20would%20have%20a%20date%20time%20format%20that%20was%20text%2C%20or%20something%20to%20eliminate%20the%20floating%20point%20error%20issue.%20This%20makes%20me%20nervous%20about%20other%20excel%20calculations.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20wonder%20if%20the%20rounding%20function%20may%20cause%20issues%20with%20format%20or%20in%20Vlookup%20formulas%3F%20I%20found%20some%20other%20options%20to%20try%2C%20in%20addition%20to%20your%20MROUND%20suggestion%20(below).%26nbsp%3B%20When%20I%20use%20either%20of%20these%20formulas%20they%20display%20the%20date%20and%20time%20correctly%2C%20but%20when%20I%20change%20the%20cell%20to%20a%20General%20format%2C%20the%20values%20are%20very%20different.%26nbsp%3B%20Which%20function%20is%20best%20to%20use%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CU%3E%3CSTRONG%3EOPTION%201%26nbsp%3B%3C%2FSTRONG%3E%3C%2FU%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CU%3E%3CSTRONG%3EDisplayed%20%3C%2FSTRONG%3E%3CSTRONG%3E%3CU%3ERe%3C%2FU%3Esult%3C%2FSTRONG%3E%3C%2FU%3E%3CSTRONG%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CU%3EActual%20Number%20Value%3C%2FU%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EA1%26nbsp%3B%20%3D%26nbsp%3B%2001%2F01%2F2000%26nbsp%3B%200%3A00%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2001%2F01%2F2000%200%3A00%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2036526%3C%2FP%3E%3CP%3EA2%26nbsp%3B%20%3D%20A1%20%2B%20TIME%20(1%2C0%2C0)%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B01%2F01%2F2000%201%3A00%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2036526.04167%3C%2FP%3E%3CP%3EA3%26nbsp%3B%20%3D%20A2%20%2B%20TIME%20(1%2C0%2C0)%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2001%2F01%2F2000%202%3A00%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%2036526.08333%3C%2FP%3E%3CP%3EA4%26nbsp%3B%20%3D%20A3%20%2B%20TIME%20(1%2C0%2C0)%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%2001%2F01%2F2000%203%3A00%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%2036526.125%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CU%3E%3CSTRONG%3EOPTION%202%26nbsp%3B%3C%2FSTRONG%3E%3C%2FU%3E%3CSTRONG%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CU%3EDisplayed%20Result%3C%2FU%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CU%3EActual%20Number%20Value%3C%2FU%3E%3C%2FSTRONG%3E%3CU%3E%3CSTRONG%3E%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FU%3E%3C%2FP%3E%3CP%3EA1%26nbsp%3B%20%3D%26nbsp%3B%2001%2F01%2F2000%26nbsp%3B%200%3A00%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B01%2F01%2F2000%200%3A00%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201%3C%2FP%3E%3CP%3EA2%26nbsp%3B%20%3D%20A1%20%2B%201%2F24%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B01%2F01%2F2000%201%3A00%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201.041666667%3C%2FP%3E%3CP%3EA3%26nbsp%3B%20%3D%20A2%20%2B%201%2F24%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2001%2F01%2F2000%202%3A00%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201.083333333%3C%2FP%3E%3CP%3EA4%26nbsp%3B%20%3D%20A3%20%2B%201%2F24%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2001%2F01%2F2000%203%3A00%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201.125%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-645977%22%20slang%3D%22en-US%22%3ERe%3A%20Autofill%20date%20time%20series%20keeps%20subtracting%20minutes%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-645977%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F346816%22%20target%3D%22_blank%22%3E%40em12345%3C%2FA%3E%26nbsp%3B%2C%20they%20shall%20give%20exactly%20the%20same%20result%2C%20TIME(1%2C0%2C0)%20is%20only%20more%20friendly%20version%20of%201%2F24%20when%20you%20are%20working%20with%20time.%20When%20you%20Fill%20series%20in%20background%20it%20also%20adds%201%2F24%20to%20each%20next%20value.%20All%20variants%20are%20in%20the%20attached%20file.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20didn't%20catch%20how%20did%20you%20receive%201%20in%20General%20format%20for%20the%20Jan%2001%2C%202000.%20It%20shall%20be%2036526%2C%20dates%20start%20from%20Jan%2001%2C%201900%20which%20is%201.%20Please%20check%20the%20row%20102%20in%20attached.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20for%20the%20VLOOKUP%20please%20may%20use%20rounded%20lookup%20value%20as%20well.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-646081%22%20slang%3D%22en-US%22%3ERe%3A%20Autofill%20date%20time%20series%20keeps%20subtracting%20minutes%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-646081%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F346816%22%20target%3D%22_blank%22%3E%40em12345%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20wanted%20to%20settle%20for%20every%203hrs%2C%20your%20accumulation%20would%20be%20exact%20because%20a%20binary%20number%20can%20store%201%2F8%20of%20a%20day%20with%20no%20error.%26nbsp%3B%20Unfortunately%20the%20best%20it%20can%20do%20for%201%20hour%20is%20about%201%2F20%20of%20a%20second%20too%20small%2C%20an%20error%20that%20accumulates%20with%20every%20step.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20you%20can%20do%20instead%2C%20is%20index%20your%20datetimes%20with%20an%20integer%20and%20only%20then%20convert%20the%20index%20values%20to%20give%20date%20and%20time.%26nbsp%3B%20Accumulating%20the%20integers%20will%20give%20a%20zero%20error%20(the%20result%20being%20the%20natural%20number%20line%20'k'%2C%20which%20could%20also%20be%20derived%20from%20the%20row%20number%20%5Bor%20the%20SEQUENCE%20function%20for%20those%20who%20have%20it%5D).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20formula%3C%2FP%3E%3CP%3E%3D%20initialDate%20%2B%20k%2F24%3C%2FP%3E%3CP%3Ewill%20give%20the%20times%20you%20need%20with%20a%20repeating%20pattern%20of%20errors%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CTABLE%3E%3CTBODY%3E%3CTR%3E%3CTD%3Eexact%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E-0.05%20sec%20(approx)%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%2B0.05%20sec%20(approx)%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3Eexact%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E-0.05%20sec%20(approx)%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%E2%80%A6%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAll%20of%20which%20is%20better%20than%20simply%20accumulating%20rounding%20error%20until%20your%20calculation%20is%20swamped%20by%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E
em12345
New Contributor

Hi,

I am creating a date time series for every hour, for the years 2000-2019 in a column.  I start by typing in the first cell: 1/1/2000 0:00, which has a custom format of m/d/yyyy h:mm.  I want the cells to show the format month/day/year with 0:00-23:00 hours. I drag the cells to fill the series down the column, this results in cells for each of the 24 hours in each day (screenshot below).

 

The problem is that I am losing 1 minute at row 102, and after this I keep losing 1 minute after every 12000 rows. Basically, every 1.37 years I lose 1 minute.   In the screenshot, after 1/5/2000 3:00 the following cell is 1/5/2000 3:59 (instead of showing time 4:00). Instead of displaying on the hour, it shows 1 minute less.  This happens again on 5/19/2001 2:59, with the following cell time changed to 3:58.  Losing another minute.

 

Could this be a bug? I don't know if it is leap year related, or why Excel is automatically changing the time series. I just want to keep the hourly format 0:00 to 23:00.

I'm using Excel MS Office Professional Plus 2019, Windows 10 operating system.

 

Thanks for any advice!

Excel_Timequestion.PNGDate Time series changes by 1 minute starting at row 102, and then every 12000 rows

 

 

4 Replies
Solution

@em12345 , that is floating point error https://support.microsoft.com/en-ca/help/78113/floating-point-arithmetic-may-give-inaccurate-results... since datetime value in Excel is actually just number, more about that is here https://www.myonlinetraininghub.com/excel-date-and-time.

 

As workaround you may type your initial date time in first cell, let say A1, in A2 add the formula

=MROUND(A1+1/24,"01:00")

and copy A2 down till end of your range (drag down or select the range starting from A2 and Ctrl+D)

Thanks for the info and reference to these articles @Sergei Baklan !

I wish Excel would have a date time format that was text, or something to eliminate the floating point error issue. This makes me nervous about other excel calculations.

 

I wonder if the rounding function may cause issues with format or in Vlookup formulas? I found some other options to try, in addition to your MROUND suggestion (below).  When I use either of these formulas they display the date and time correctly, but when I change the cell to a General format, the values are very different.  Which function is best to use?

           OPTION 1                        Displayed Result           Actual Number Value

A1  =  01/01/2000  0:00             01/01/2000 0:00              36526

A2  = A1 + TIME (1,0,0)              01/01/2000 1:00              36526.04167

A3  = A2 + TIME (1,0,0)              01/01/2000 2:00              36526.08333

A4  = A3 + TIME (1,0,0)              01/01/2000 3:00              36526.125

 

OPTION 2                                   Displayed Result           Actual Number Value

A1  =  01/01/2000  0:00              01/01/2000 0:00              1

A2  = A1 + 1/24                          01/01/2000 1:00              1.041666667

A3  = A2 + 1/24                          01/01/2000 2:00              1.083333333

A4  = A3 + 1/24                          01/01/2000 3:00              1.125

@em12345 , they shall give exactly the same result, TIME(1,0,0) is only more friendly version of 1/24 when you are working with time. When you Fill series in background it also adds 1/24 to each next value. All variants are in the attached file.

 

I didn't catch how did you receive 1 in General format for the Jan 01, 2000. It shall be 36526, dates start from Jan 01, 1900 which is 1. Please check the row 102 in attached.

 

As for the VLOOKUP please may use rounded lookup value as well.

@em12345 

If you wanted to settle for every 3hrs, your accumulation would be exact because a binary number can store 1/8 of a day with no error.  Unfortunately the best it can do for 1 hour is about 1/20 of a second too small, an error that accumulates with every step.

 

What you can do instead, is index your datetimes with an integer and only then convert the index values to give date and time.  Accumulating the integers will give a zero error (the result being the natural number line 'k', which could also be derived from the row number [or the SEQUENCE function for those who have it]).

 

The formula

= initialDate + k/24

will give the times you need with a repeating pattern of errors

 

exact
-0.05 sec (approx)
+0.05 sec (approx)
exact
-0.05 sec (approx)

 

All of which is better than simply accumulating rounding error until your calculation is swamped by it.

Related Conversations