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 Help with a simple macro

Hi,

Am Thu, 7 Jan 2016 07:08:35 -0800 (PST) schrieb :

Range("O1:O11").Select
Range("O11").Activate
Selection.ClearContents
Range("O1").Select
ActiveSheet.PasteSpecial Format:="Unicode Text", Link:=False, _
DisplayAsIcon:=False, NoHTMLFormatting:=True
Range("O12").Select
Selection.Copy
Range("O30").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False


why do you paste O12 in multiple cells from O30 downwards?

Try for that part of the code:

Range("O12").Copy
If Len(Range("O30")) = 0 Then
Set Dest = Range("O30")
Else
Set Dest = Cells(Rows.Count, "O").End(xlUp)(2)
End If

Dest.PasteSpecial Paste:=xlPasteValues


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional