Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Please help! Copy sheet to another sheet from cell value


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Please help! Copy sheet to another sheet from cell value

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Please help! Copy sheet to another sheet from cell value


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
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
copy rows from one Data sheet to another sheet based on cell conte John McKeon Excel Discussion (Misc queries) 2 May 15th 10 06:49 AM
copy data of two cells from Sheet 2 into one cell in Sheet 1 cahabbinga Excel Worksheet Functions 6 January 30th 08 01:00 PM
how to copy a cell with formula from sheet 1 (data is all vertical) into sheet 2 parag Excel Worksheet Functions 3 June 15th 06 10:29 PM
Active Cell Copy And Paste Sheet to Sheet A.R.J Allan Jefferys New Users to Excel 4 May 4th 06 02:04 AM
Copy text from same cell on every sheet to title sheet? Jon Excel Discussion (Misc queries) 2 February 9th 05 03:11 PM


All times are GMT +1. The time now is 05:10 AM.

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

About Us

"It's about Microsoft Excel"