Iceberg
Board Regular
- Joined
- Mar 12, 2008
- Messages
- 79
Hello!
I am trying to write a bit of code to find the number of years between 2 columns of dates. I have one set of dates in Column D, another in E, and I would like the results to post in Column G.
Here's what I tried:
It works, but it gives me the number of days instead of the number of years.
Thanks in advance...!
I am trying to write a bit of code to find the number of years between 2 columns of dates. I have one set of dates in Column D, another in E, and I would like the results to post in Column G.
Here's what I tried:
Rich (BB code):
For I = 2 To J
Let Range("G" & I).Value = Range("E" & I).Value - Range("D" & I).Value
Next I
It works, but it gives me the number of days instead of the number of years.
Thanks in advance...!