- Dec 13, 2017
- Reaction score
I have a formula that would update itself automatically. For several years it worked great now it is giving false dates
I want to apologize to you and everyone else. I failed to provide the formula.Please share the details of the formula.
This looks similar to the current formula, except different formula. It appears that you still have to use a static date. Also I don't understand "Move Q6:V7 to K10" . What is in the range? Is there some way of getting rid of the static date?Select K6 and type 10/1/2019
Select K7 and type =DATE(YEAR(+K6+32),MONTH(K6+32),1)-1
Select L6 and type =DATE(YEAR(+K6+32),MONTH(K6+32),1)
Copy L6:L7 formula right wards on 12 columns
Move Q6:V7 to K10
Yes... Let me get back to my laptop... I am away.... Try writing a change or, Beforedouble click event.... That will advance the static cell to 1st day of previous /next year...This looks similar to the current formula, except different formula. It appears that you still have to use a static date. Also I don't understand "Move Q6:V7 to K10" . What is in the range? Is there some way of getting rid of the static date?
It works. However it requires the user to double click on cell J8. Would it be possible avoid any user interaction, & let the system change that date?Copy the following in your worksheet code area....then double click on J8 to jump to the next year..
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
tgt = "$J$8"
If Target.Address <> UCase(tgt) Then Exit Sub
Target.Formula = "=date(year(datevalue(""" & Target & """))+1,10,1)"
Range("K6") = Target
I cant believe how simple the formula is. You are a genius. The only thing I had to do was move P10 to P9 & P11 to P10. I have struggling for the past month to do what you did. Thank you.OK remove all vba code.
Write this formula in the cell j8.
Write this formula in the cell K6
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.