Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default set up macro to goto cell with "today" in

I have mutiple worksheets with daily information covering 6 months. I have
set up formula that highlights column with "today" realting to current date.
I would like to set up macro on each worksheet that I can run to take me to
"todays" date
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default set up macro to goto cell with "today" in

Stuart,

For Each Wks In Activeworkbook.Worksheets
Wks.Select
Wks.Range("B:B").Find(Format(Now(), "mm/dd/yy"), , xlValues).Select
Next Wks

Change the mm/dd/yy to reflect the formatting that you use for your dates.

HTH,
Bernie
MS Excel MVP


"Stuart WJG" <Stuart wrote in message
...
I have mutiple worksheets with daily information covering 6 months. I have
set up formula that highlights column with "today" realting to current date.
I would like to set up macro on each worksheet that I can run to take me to
"todays" date



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default set up macro to goto cell with "today" in

Bernie
Not sure what you mean by Wks
This is is what I have

A1 A2 A3 TODAY A5 A6
10-Mar-08 11-Mar-08 12-Mar-08 13-Mar-08 14-Mar-08 15-Mar-08

I would like macro to goto A4 in this case or A5 if tomorrow

Thanks for you help
Stuart

"Bernie Deitrick" wrote:

Stuart,

For Each Wks In Activeworkbook.Worksheets
Wks.Select
Wks.Range("B:B").Find(Format(Now(), "mm/dd/yy"), , xlValues).Select
Next Wks

Change the mm/dd/yy to reflect the formatting that you use for your dates.

HTH,
Bernie
MS Excel MVP


"Stuart WJG" <Stuart wrote in message
...
I have mutiple worksheets with daily information covering 6 months. I have
set up formula that highlights column with "today" realting to current date.
I would like to set up macro on each worksheet that I can run to take me to
"todays" date




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default set up macro to goto cell with "today" in

That's exactly what Bernie's macro does. Did you try it?

Regards,
Fred.

"Stuart WJG" wrote in message
...
Bernie
Not sure what you mean by Wks
This is is what I have

A1 A2 A3 TODAY A5 A6
10-Mar-08 11-Mar-08 12-Mar-08 13-Mar-08 14-Mar-08 15-Mar-08

I would like macro to goto A4 in this case or A5 if tomorrow

Thanks for you help
Stuart

"Bernie Deitrick" wrote:

Stuart,

For Each Wks In Activeworkbook.Worksheets
Wks.Select
Wks.Range("B:B").Find(Format(Now(), "mm/dd/yy"), , xlValues).Select
Next Wks

Change the mm/dd/yy to reflect the formatting that you use for your
dates.

HTH,
Bernie
MS Excel MVP


"Stuart WJG" <Stuart wrote in message
...
I have mutiple worksheets with daily information covering 6 months. I
have
set up formula that highlights column with "today" realting to current
date.
I would like to set up macro on each worksheet that I can run to take
me to
"todays" date





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default set up macro to goto cell with "today" in

Stuart,

Try this:

Sub GoToToday()
Range("A:A").Find(Format(Now(), "dd-mmm-yy"), , xlValues).Select
End Sub

This will find today's date on the currently active worksheet.

HTH,
Bernie
MS Excel MVP


"Stuart WJG" wrote in message
...
Bernie
Not sure what you mean by Wks
This is is what I have

A1 A2 A3 TODAY A5 A6
10-Mar-08 11-Mar-08 12-Mar-08 13-Mar-08 14-Mar-08 15-Mar-08

I would like macro to goto A4 in this case or A5 if tomorrow

Thanks for you help
Stuart

"Bernie Deitrick" wrote:

Stuart,

For Each Wks In Activeworkbook.Worksheets
Wks.Select
Wks.Range("B:B").Find(Format(Now(), "mm/dd/yy"), , xlValues).Select
Next Wks

Change the mm/dd/yy to reflect the formatting that you use for your dates.

HTH,
Bernie
MS Excel MVP


"Stuart WJG" <Stuart wrote in message
...
I have mutiple worksheets with daily information covering 6 months. I have
set up formula that highlights column with "today" realting to current date.
I would like to set up macro on each worksheet that I can run to take me to
"todays" date








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 272
Default set up macro to goto cell with "today" in

Another way is to insert a Name (Edit Menu) e.g. "T" which refers to:
=INDEX(!$A:$A,MATCH(TODAY(),!$A:$A,0))
Then just type "t" into the Name Box (to the left of the formula bar)

....OR you can choose Record New Macro (tools Menu) and type in the Name Box:
index(a:a,match(today(),a:a,0))
stop recording and assign this to a button


"Stuart WJG" wrote:

I have mutiple worksheets with daily information covering 6 months. I have
set up formula that highlights column with "today" realting to current date.
I would like to set up macro on each worksheet that I can run to take me to
"todays" date

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default set up macro to goto cell with "today" in

Hi
This is the macro I have done
Sub GoToToday()
Range("F2:HP2").Find(Format(Now(), "dd-mm-yy"), , xlValues).Select
End Sub
When I run i get this error
Run Time error: "91"
Object variable or With block variable not set
I am running Excel 2007

"Bernie Deitrick" wrote:

Stuart,

Try this:

Sub GoToToday()
Range("A:A").Find(Format(Now(), "dd-mmm-yy"), , xlValues).Select
End Sub

This will find today's date on the currently active worksheet.

HTH,
Bernie
MS Excel MVP


"Stuart WJG" wrote in message
...
Bernie
Not sure what you mean by Wks
This is is what I have

A1 A2 A3 TODAY A5 A6
10-Mar-08 11-Mar-08 12-Mar-08 13-Mar-08 14-Mar-08 15-Mar-08

I would like macro to goto A4 in this case or A5 if tomorrow

Thanks for you help
Stuart

"Bernie Deitrick" wrote:

Stuart,

For Each Wks In Activeworkbook.Worksheets
Wks.Select
Wks.Range("B:B").Find(Format(Now(), "mm/dd/yy"), , xlValues).Select
Next Wks

Change the mm/dd/yy to reflect the formatting that you use for your dates.

HTH,
Bernie
MS Excel MVP


"Stuart WJG" <Stuart wrote in message
...
I have mutiple worksheets with daily information covering 6 months. I have
set up formula that highlights column with "today" realting to current date.
I would like to set up macro on each worksheet that I can run to take me to
"todays" date






  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default set up macro to goto cell with "today" in

Stuart,

Your origianl post shows a format of dd-mmm-yy

To be certain, try this:

Sub TryNow()
Range("F2:HP2").NumberFormat = "dd-mmm-yy"
On Error GoTo NoDate
Range("F2:HP2").Find(Format(Now(), "dd-mmm-yy"), , xlValues).Select
Exit Sub
NoDate:
MsgBox Format(Now(), "dd-mmm-yy") & " was not found."
End Sub

Note that this will also fail if the columns are not wide enough to show the date - if they have
######## in them, increase the column width.

HTH,
Bernie
MS Excel MVP


"Stuart WJG" wrote in message
...
Hi
This is the macro I have done
Sub GoToToday()
Range("F2:HP2").Find(Format(Now(), "dd-mm-yy"), , xlValues).Select
End Sub
When I run i get this error
Run Time error: "91"
Object variable or With block variable not set
I am running Excel 2007

"Bernie Deitrick" wrote:

Stuart,

Try this:

Sub GoToToday()
Range("A:A").Find(Format(Now(), "dd-mmm-yy"), , xlValues).Select
End Sub

This will find today's date on the currently active worksheet.

HTH,
Bernie
MS Excel MVP


"Stuart WJG" wrote in message
...
Bernie
Not sure what you mean by Wks
This is is what I have

A1 A2 A3 TODAY A5 A6
10-Mar-08 11-Mar-08 12-Mar-08 13-Mar-08 14-Mar-08 15-Mar-08

I would like macro to goto A4 in this case or A5 if tomorrow

Thanks for you help
Stuart

"Bernie Deitrick" wrote:

Stuart,

For Each Wks In Activeworkbook.Worksheets
Wks.Select
Wks.Range("B:B").Find(Format(Now(), "mm/dd/yy"), , xlValues).Select
Next Wks

Change the mm/dd/yy to reflect the formatting that you use for your dates.

HTH,
Bernie
MS Excel MVP


"Stuart WJG" <Stuart wrote in message
...
I have mutiple worksheets with daily information covering 6 months. I have
set up formula that highlights column with "today" realting to current date.
I would like to set up macro on each worksheet that I can run to take me to
"todays" date








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need the formula or macro. If i enter today date in the cell (Row 1,Column 2) and on tab out, the column 1 cell should be filled with "corresponding Day" of the date kakasay Excel Discussion (Misc queries) 1 January 22nd 07 12:31 PM
Need Formula or macro. If i enter today date in the cell (Row 1,Column 2) and on tab out, the column 1 cell should be filled with "corresponding Day" of the date kakasay Excel Discussion (Misc queries) 1 January 22nd 07 12:31 PM
How can I use the "TODAY ()" Function in an "IF/THEN" calculation Rodney Excel Worksheet Functions 4 April 12th 06 10:16 AM
IF(D2="Paid","",IF(C2="","",IF(TODAY()<C2,"",IF(TODAY()-C214,"Ove Kev Excel Discussion (Misc queries) 2 December 24th 05 03:28 PM
=IF((TODAY()-B8)30, "Overdue", "Current"), Kev Excel Discussion (Misc queries) 3 December 16th 05 08:15 PM


All times are GMT +1. The time now is 11:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"