Hi Daniel,
If they are Excel dates they represent the days and fractional days past
Dec 31, 1899 if using the 1900 date system. So if you just have dates
they have no fractional components and you just subtract the earlier
date from the later date for the number of days. So it doesn't really
matter if it is Excel or VBA same method.
A1: 1998-11-28 B1: 2005-07-11 C1: =B1-A1
format c1 as number: #,##0
otherwise you will see: 1906-08-13
in VBA something like either of these, no formatting required
[c1] = [b1] - [a1]
Cells(1,3).value = Cells(1,2).value - Cells(1,1).value
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.