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. |
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. |
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. |
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. |
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. |
All times are GMT +1. The time now is 09:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com