#1   Report Post  
Posted to microsoft.public.excel.misc
SJ SJ is offline
external usenet poster
 
Posts: 22
Default find day

I have a workbook that in the first sheet is daily data that changes and the
rest of the sheets relate to a day in the month, I want to be able to type in
todays date in the first worksheet (A1) and then run a macro to go to that
day, is this possible?

any help appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default find day

Sure. Record yourself doing a Find operation, and in the macro, replace the
text string with a cell reference, like so:

Sub FindMe()
'Change the What:=Range(XX).value to match your cell
Cells.Find(What:=Range("A1").Value, After:=Range("A1"), _
LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
End Sub
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Sj" wrote:

I have a workbook that in the first sheet is daily data that changes and the
rest of the sheets relate to a day in the month, I want to be able to type in
todays date in the first worksheet (A1) and then run a macro to go to that
day, is this possible?

any help appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default find day

If sheet is named as 13082009 without any spaces and in cell a1 you have the
date 08/13/2009 in excel date format..try the below code....

Sub Macro()
Dim strSheet As String
strSheet = Format(Range("A1"), "ddmmyyyy")
Sheets(strSheet).Activate
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Sj" wrote:

I have a workbook that in the first sheet is daily data that changes and the
rest of the sheets relate to a day in the month, I want to be able to type in
todays date in the first worksheet (A1) and then run a macro to go to that
day, is this possible?

any help appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.misc
SJ SJ is offline
external usenet poster
 
Posts: 22
Default find day

Thanks, I tried this and I am still having problems, what i want to do is to
have 32 sheets in the workbook, in sheet 1, cell A1 I want to have the today
formula and then in sheet 2 the A1 cell will be a blank cell into which I
input the date on the first day of the month, the following sheets will all
have corresponding formulas to work out the rest of the days in the month. I
want to be able to open up the book on sheet one and have a button which lets
me go to the corresponding day as cell A1 shows, and I this is where I am
struggling, any ideas.

"Luke M" wrote:

Sure. Record yourself doing a Find operation, and in the macro, replace the
text string with a cell reference, like so:

Sub FindMe()
'Change the What:=Range(XX).value to match your cell
Cells.Find(What:=Range("A1").Value, After:=Range("A1"), _
LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
End Sub
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Sj" wrote:

I have a workbook that in the first sheet is daily data that changes and the
rest of the sheets relate to a day in the month, I want to be able to type in
todays date in the first worksheet (A1) and then run a macro to go to that
day, is this possible?

any help appreciated.

  #5   Report Post  
Posted to microsoft.public.excel.misc
SJ SJ is offline
external usenet poster
 
Posts: 22
Default find day

Thanks, I tried this and I am still having problems, what i want to do is to
have 32 sheets in the workbook, in sheet 1, cell A1 I want to have the today
formula and then in sheet 2 the A1 cell will be a blank cell into which I
input the date on the first day of the month, the following sheets will all
have corresponding formulas to work out the rest of the days in the month. I
want to be able to open up the book on sheet one and have a button which lets
me go to the corresponding day as cell A1 shows, and I this is where I am
struggling, any ideas.

"Luke M" wrote:

Sure. Record yourself doing a Find operation, and in the macro, replace the
text string with a cell reference, like so:

Sub FindMe()
'Change the What:=Range(XX).value to match your cell
Cells.Find(What:=Range("A1").Value, After:=Range("A1"), _
LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
End Sub
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Sj" wrote:

I have a workbook that in the first sheet is daily data that changes and the
rest of the sheets relate to a day in the month, I want to be able to type in
todays date in the first worksheet (A1) and then run a macro to go to that
day, is this possible?

any help appreciated.

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
Find First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM
where to put results of find operation in find and replace functio DEP Excel Worksheet Functions 5 November 15th 06 07:52 PM
Despite data existing in Excel 2002 spreadsheet Find doesn't find AnnieB Excel Discussion (Misc queries) 1 June 16th 06 02:15 AM
'find' somtimes can't find numbers. I folowd the 'help' instructi. Yaron Excel Worksheet Functions 2 November 30th 05 05:46 PM
How do I find a file/spreadsheet that Excel says is Already open but I can't find it? nwtrader8 Excel Discussion (Misc queries) 5 June 21st 05 02:16 PM


All times are GMT +1. The time now is 01:03 AM.

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"