Dates in VBA

W

wienmichael

The dates being returned in my formulas are 4 years and 1 day later. Even
just with the Now function. Why?
 
R

Ron Rosenfeld

The dates being returned in my formulas are 4 years and 1 day later. Even
just with the Now function. Why?

In VBA as in the Subject??

Please post examples.

If you mean in your worksheet, go to Tools/Options/Calculations/Workbook
Options and DEselect 1904 Date system.
--ron
 
W

wienmichael

Thanks for the help.

Ron Rosenfeld said:
In VBA as in the Subject??

Please post examples.

If you mean in your worksheet, go to Tools/Options/Calculations/Workbook
Options and DEselect 1904 Date system.
--ron
 
G

Gord Dibben

Check out the Date System you are using in Tools>Options>Calculation.

Sounds like the 1904 system is checked.

Uncheck it.

Your dates will not change so you will have to subtract 1462 from each.

Enter 1462 in an unused cell.

Copy then select your dates and Paste Special>Subtract>OK>Esc.

Re-format the cells to Date as the above operation will change to Number.


Gord Dibben MS Excel MVP
 
Top