Jerome Hayes
asked on
Today function loop
Hello Experts
I'm looking for VBA code to do the following:
loop through cells in column "B" starting at "B2; put a "Today" function in Column M that calculate the dates in column J starting at "J2". The formula that i'm currently using and auto filling down in column M is =Today()-J2
Thank you
I'm looking for VBA code to do the following:
loop through cells in column "B" starting at "B2; put a "Today" function in Column M that calculate the dates in column J starting at "J2". The formula that i'm currently using and auto filling down in column M is =Today()-J2
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'm getting an error message in the loop.
ASKER
Worked great, thanks
You are welcome :)
Sid
Sid
Are you still facing any problems?
Sid
Sid
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Sub Sample()
Dim Lastrow As Long
Lastrow = Sheets("Sheet1").Range("B"
Range("M2").Formula = "=Today()-J2"
Range("M2").AutoFill Destination:=Range("M2:M" & Lastrow), Type:=xlFillDefault
End Sub
Sid