In Excel 2010, I have a date “01-01-2012” and a left and right arrow.
I need to apply a macro or something else so the days in the date will decrease/increase accordingly. How can this be done?
Example:
“01-03-2012”, when right-arrow is pressed, the date should change to “02-03-2012”, and next time “03-03-2012” and so on.. from [01-31]
Note, the months and years shall never change.
I have made a macro, that can change the date the fixed date I typed in when recording the macro, but it’s not good enough. I need it to add/substract instead.
I named the cell where the date is “theDate”. The Sub for
SubtractDayis pretty much the same, the second argument for theDateAddfunction would be -1.Please note that is a quick’n’dirty VBA Sub, since this is not my “forte”, but it will work…