-
July 13th, 2014, 02:54 PM
#1
DateDiff assistance
So I need some help debugging some code. I'm trying to create a macro that updates the years since a date that is given in column 16 of each row then placing that number of years in row Sub dateUpD8()
x = 3
Do Until Cells(x, 16).Value = ""
d = Cells(x, 16).Value
fromDate = CDate(d)
toDate = CDate(Now)
Cells(x, 27).Value = DateDiff("y", fromDate, toDate)
x = x + 1
Loop
End Sub
What am I doing wrong?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|