Automatic updating in excel
There are several ways to insert the current date and time in a cell.A static value in a worksheet is one that doesn’t change when the worksheet is recalculated or opened.If possible, I need this to be active for the cells C2: C30 ( D2: D30 for the date time) Using Excel 2010.
EDIT: Here is some code: For the UDF: You will have to give the D2-Cell a Date-Time Format, or it will show a numeric representation of the date-value.
And you can expand the formula over the desired range by draging it if you keep the C2 reference in the D2-formula relative.
Note: This still might not be the ideal solution because every time Excel recalculates the workbook the date in D2 will be reset to the current value.
To insert the current date or time so that it is updatable, use the TODAY and NOW functions, as shown in the following example.
For more information about how to use these functions, see TODAY function and NOW function.