Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi I could really do with some one help with this if possible??? The problem which I have is I have 52 sheets for the year and a master sheet for data to be edited. I want the to enter a week number E.g. (Wk2) into a cell, and the macro would look up that worksheet which already exsists and copy the worksheet tot hat sheet. E.g. If I enter Wk2 into cell (Q7) on the master sheet, I would want the sheet to copied to Wk2. Hope some one can help -- bsnapool ------------------------------------------------------------------------ bsnapool's Profile: http://www.excelforum.com/member.php...o&userid=36115 View this thread: http://www.excelforum.com/showthread...hreadid=558866 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
with Master the active sheet, right click on the sheet tab and select view
code. In the resulting module paste in code similar to this: Private Sub Worksheet_Change(ByVal Target As Range) Dim sh As Worksheet If Target.Address(0, 0) = "Q7" Then On Error Resume Next Set sh = Worksheets(Target.Value) On Error GoTo 0 If Not sh Is Nothing Then Cells.Copy sh.Cells Else MsgBox Target.Value & " does not exist" End If End If End Sub -- Regards, Tom Ogilvy "bsnapool" wrote: Hi I could really do with some one help with this if possible??? The problem which I have is I have 52 sheets for the year and a master sheet for data to be edited. I want the to enter a week number E.g. (Wk2) into a cell, and the macro would look up that worksheet which already exsists and copy the worksheet tot hat sheet. E.g. If I enter Wk2 into cell (Q7) on the master sheet, I would want the sheet to copied to Wk2. Hope some one can help -- bsnapool ------------------------------------------------------------------------ bsnapool's Profile: http://www.excelforum.com/member.php...o&userid=36115 View this thread: http://www.excelforum.com/showthread...hreadid=558866 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() You are a legend!! Nice one -- bsnapool ------------------------------------------------------------------------ bsnapool's Profile: http://www.excelforum.com/member.php...o&userid=36115 View this thread: http://www.excelforum.com/showthread...hreadid=558866 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy rows from one Data sheet to another sheet based on cell conte | Excel Discussion (Misc queries) | |||
copy data of two cells from Sheet 2 into one cell in Sheet 1 | Excel Worksheet Functions | |||
how to copy a cell with formula from sheet 1 (data is all vertical) into sheet 2 | Excel Worksheet Functions | |||
Active Cell Copy And Paste Sheet to Sheet | New Users to Excel | |||
Copy text from same cell on every sheet to title sheet? | Excel Discussion (Misc queries) |