I have a cell with the format "mm/dd/yyyy hh:mm:ss". I want to auto increment the minute, but when I manually auto increment after selecting only that cell, it increments the day. To make it increment the minute, I have to manually copy the cell below, add one minute, select both and THEN increment. Is it possible to, in VBA, specify what part of the cell I want to be incremented when I use the
Selection.AutoFill
function and only have one cell selected? As it is, recording the macro gives me
Selection.AutoFill Destination:=Range("BU2:BU3"), Type:=xlFillDefault
In Excel dates and times are stored differently then in other languages.
From http://www.cpearson.com/excel/datetime.htm
Excel stores dates and times as a number representing the number of days since 1900-Jan-0, plus a fractional portion of a 24 hour day: ddddd.tttttt
This is called a serial date, or serial date-time.
If you want to increment by minute then you should add the fraction of a day that is equal to one minute
Minutes in a day = 1440
1 / 1440 = 0.00069444
Set your auto increment function to 0.00069444 and it should work they way you expect.