Excel - Date/time subtraction

October 2016


Ineed a macro that will subtract date-time in column A with the Present Date-time and display the value as number of days..

(Sample Calculation performed at 6/1/2012 21:00)

6/1/2012 21:44-----------------0
6/2/2012 12:42-----------------1
6/3/2012 08:44-----------------1
6/5/2012 20:44-----------------2
2/1/2012 22:32-----------------126
5/3/2012 11:11-----------------35

Values in column A can vary so calculation is done according to it..


Suppose that the data is A1 to B6

In C1 type this formula

In D1 type this formula

Highlight c1 and d1 and copy them down

Thanks to RWomanizerfor this tip.

Related :

This document entitled « Excel - Date/time subtraction » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.