View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Convert A1 value to a sheet name and copy to it

Hi Howard,

Am Sat, 12 Jan 2013 00:48:20 -0800 (PST) schrieb Howard:

Option Explicit
Sub AtoCPaste()
Range("A1,A3,A5").Copy
Sheets("January 2013").Range("C1000").End(xlUp).Offset(1, 0).PasteSpecial
End Sub


try:
Sub AtoCPaste()
Dim shName As String

With Sheets("Sheet1")
shName = Format(.Range("A1"), "MMMM YYYY")
.Range("A1,A3,A5").Copy
Sheets(shName).Range("C1000").End(xlUp).Offset(1, 0).PasteSpecial
End With
End Sub

Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2