create a macro/button that will go to today's date cell

mistrall22

New Member
Joined
Jun 17, 2011
Messages
2
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
I have an excel worksheet with a one year calendar all in one worksheet.<o:p></o:p>
<o:p></o:p>
I would like create a macro that will bring me to Today’s cell wherever I am in the worksheet.<o:p></o:p>
<o:p></o:p>
tks for your help :cool:<o:p></o:p>
<o:p></o:p>
Jay<o:p></o:p>
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
You're welcome.

Hi,I wonder if you can help me???I want a similar thing. I would like a button that when pressed takes me to todays date. As before the spread sheet has a full year date range in the column headers with several rows of information below.Thanks
 
Upvote 0
Code:
[color=darkblue]Sub[/color] Select_Today()
    Rows(1).Find(Date, , xlFormulas, xlWhole).Select
[color=darkblue]End[/color] [color=darkblue]Sub[/color]
 
Upvote 0
  • Alt+F11 to open the vba editor
  • From the menu, select Insert \ Module
  • Paste the code in the edit window


vba5.png
 
Upvote 0
  • Alt+F11 to open the vba editor
  • From the menu, select Insert \ Module
  • Paste the code in the edit window
To follow up... after doing the above, then you can assign AlphaFrog's Select_Today macro to the button's click event (right click the button and choose "Assign macro").
 
Upvote 0
This macro isn't working for me, possibly because my dates are determined by a formula. In my sheet, the user defines a start date and an end date for a project. The date row then populates off these dates.

Is there a way to modify this macro to look at the cell value rather than the formula? Here is the formula that determines the date:

=IFERROR(IF(DATE(YEAR(H$7),MONTH(H$7),DAY(H$7)+1)<=$E$1,(DATE(YEAR(H$7),MONTH(H$7),DAY(H$7)+1))," "),"")

Thank you for the help!
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

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