"GO TO" TODAY()----select today out of full year dates in one column.

GFelts

New Member
Joined
Feb 9, 2019
Messages
20
I have a rather large spreadsheet that has twenty col across and 430 rows down, 365 of these rows have information and a date starting with 1/1/2019 in D36 thru 12/31/2019 in D401. Top 5 rows are froze so they can view averages in Row 5 and other information. Also a place to put the buttons for navigation, go to top, go to bottom, and go to chart macros. Each work day information is added to the corresponding date row. Which in turn drives a chart located at the top of the sheet for the BRASS to look at each morning. Not much of a problem now simple page up/page down and your there. But come around Mach and April on, the BRASS that look at this information will have to press a button for a macro to go to the top of the page so they can see the averages and another button the view the chart these macros are already working. (God forbid they have to scroll or page up to do that). But if they want to look at the data that is driving the chart---back down the page they go.....this is where they have problems. I want to add a button which will take them to todays date. If by chance they press "SAVE" while at the chart located at the top of the sheet then the next morning someone at 03:30am (probably me) half asleep, groggy eyed, grumpy, and sucking on coffee will have to go to the last date and enter the required information for today. Just FYI we are closed sometimes on the weekend so there is no data entered and this creates a break between the dates. Or I would use the End button in a macro on a column that I enter data into-- no work--no data which stops me from using End in a macro. It would stop at every Friday that we did not work that weekend. So far we have worked all but three weekends this year. So I have three breaks in the dates that stop the END function dead.

Assume Friday was 3/1/2019 the last date info was entered which is located in Cell D95, Closed Sat 3/2 and Sun 3/3 no data entered. Monday morning I press the magical button while at the top of the sheet and it goes to D98 which is 3/4/2019 Monday which is based on the date in B2 where I have TODAY() located at. Is there a Formula or VBA code that will use the TODAY() in B2 and then GO TO Cell D98? Actually I would like for it to go to "A98" the first cell to receive data. I'm at a loss but my Boss "WOULD LIKE TO SEE" this happen so he looks good to his boss's each morning while they play arm chair quarterback with the previous days data. VBA is not my forte But my Boss WOULD LIKE TO SEE this happen and he signs my paychecks. So I would like to see this happen as well and would love to figure out how the heck to do it myself. Any help would be appreciated ALOT!

Thanks in advance
Greg
 
You could use Goto method too such as:

Code:
Set c = Sheets("Sheet1").Columns("C").Find(Date, LookIn:=xlValues, LookAt:=xlWhole)
If Not c Is Nothing Then Application.Goto c.Offset(0, -2), True
 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
thanks mark it is tyhe whole macro lol
Is there anyway I can talk you into re-writing it exactly as I would put it in. I'm sorry but I couldn't make heads or tails out of it, so I never could get it to work. I am just getting into Excel, VBA and codes, But Im learning something new about EXCEL every day one error at a time... :help:
 
Last edited:
Upvote 0
Steve
I copied what you have and put it in a macro, I have Today() in B2 and put dates in Col "C". I put dates on 3 sheets in Col "C". I ran the macro and nothing happened. I know nothing about VBA Do I add this as a module? I have SUB RETURN_TO_DATE() at the beginning and END SUB at the end. Then I ran the Macro and as far as I can tell nothing happens. Can you point me in the right direction. I will be out of pocket for the next three days. Lord willing I will be back on Monday. So if I don't answer its nothing against your answer. Mr. Vet (Doctor) wants to cut on me and I finally agreed.
 
Upvote 0
Mark It may work for someone who knows how to put it in, But I can't make heads or tails out of it and tried several ways to put it in and no luck. I know nothing at all about VBA and just getting into Excel. So Formulas and VBA are all new to me.
 
Upvote 0
From your sheet
Press ALT + F11 which will open the VB editor
Click Insert then click Module
Paste the code
Click anywhere in the code
Press F5
Check the result.


Apologies it should have been "My Aswer Is This" :(
 
Last edited:
Upvote 0
OP, record a dummy macro that just selects say cell G5. stop the macro. edit the macro by deleting the the single row that says cells("G5").select and replace it with my single line of code. Make sure you have a cell with the formula = today() in the correct cell. Does this help ?
 
Upvote 0
=Cells(cells(1,15),3).Select

cells(1,15) is the code way of saying O1
=text(cells(1,15),"d") is saying what is the number of today's date
that can be left in the formula or stored in a helper cell
offset says go down this far then go left or right this far

 
Upvote 0
Or to be honest if formulas are new to you s you state then I'd start by getting used to excel a bit before jumping into VBA and getting confused.
 
Upvote 0
Or to be honest if formulas are new to you s you state then I'd start by getting used to excel a bit before jumping into VBA and getting confused.

Where do you get this Getting CONFUSED? I don't know if I'm coming or going or if I have already been there. But I will figure it out, no box of electrons is going to get the better of me. With folks like the ones I have found here on this board and Google, shoot I could perform magic.:)
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top