Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all
I am looking for a macro to lookup up a number in cell d5 on worksheet "ladderprint" If for example this cell has "11" in it , I want it to copy the whole worksheet to sheet "ladder 11". Is this possible? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim SheetName As String, NewSheet As Worksheet
SheetName = "ladder " & Worksheets("ladderprint").Range("D5").Value Worksheets("ladderprint").Cells.Copy On Error GoTo MakeSheet Set NewSheet = Worksheets(SheetName) NewSheet.Cells.PasteSpecial xlPasteAll ' or xlPasteValues if you only want values, etc. Application.CutCopyMode = False Exit Sub MakeSheet: Set NewSheet = Worksheets.Add() NewSheet.Name = SheetName NewSheet.Cells.PasteSpecial xlPasteAll ' or xlPasteValues if you only want values, etc. Application.CutCopyMode = False "browie" wrote: Hi all I am looking for a macro to lookup up a number in cell d5 on worksheet "ladderprint" If for example this cell has "11" in it , I want it to copy the whole worksheet to sheet "ladder 11". Is this possible? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
lock of copy command | Excel Worksheet Functions | |||
Copy Command | Excel Discussion (Misc queries) | |||
Automate copy command? | Excel Worksheet Functions | |||
Automate copy command | Excel Discussion (Misc queries) | |||
I want to combine a "match" command with a copy and paste command. | Excel Programming |