I've been using a spreadsheet for many years now to keep track of my finances, to-do lists, and several other things. It dawned on me last night that I could make my life much easier if I automated some of this, but I haven't been able to make much progress.
I attached a sample of the calendar I want to work with. It has 7 columns - one for each day of the week - and 7 "rows" - a group of 6 rows per day. Each day also has a date above it that will change color via conditional formatting based on the current date.
Here is what I want to do and haven't been able to implement with VBA:
When I push the "Update Calendar" button, if the current day is not in the first row of days, I want to move all of the information in each row of days to the one above it.
As an example, today is December 29th, so cell D3 should be pink as it is the current date. The text in the section under it for that day is "Message C1". Now imagine today is January 5th. The text in the section under D10, the cell with January 10th in it, is "Message C2". Since the current day is no longer in the first row of days, I want to be able to push the "Update Calendar" button and have the following things happen:
The dates in the first row of days need to be changed to make the current day in the first row instead of the second row. All of the accompanying messages need to be moved up as well, e.g. "Message A2" should now be in cell B4 instead of B11, "Message F4" should now be in cell G18 instead of G25, etc.
The VBA code I've been messing with is included in this spreadsheet, but so far I've gotten almost nothing accomplished as I can't get Find() to locate the cell with the current date in it. Any help anyone can give me would be much appreciated. I want to learn how to do this so I'm not asking anyone to just do it for me.
Bookmarks