Cleaning up code

  • Thread starter Thread starter kevin
  • Start date Start date
K

kevin

Hi I recorded a copy/paste special as values macro but am sure there is a
more elegant way of writing the code. what part of the code below is not
necessary?

Sheets("Market").Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("A1").Select

Thanks
Kevin
 
I missed the paste special..Try the below

Sub Macro2()
Sheets("Market").UsedRange = Sheets("Market").UsedRange.Value
End Sub

If this post helps click Yes
 
Using PasteSpecial.

With Sheets("Market")
.Cells.Copy
.Range("A1").PasteSpecial xlPasteValues
End With
 
Back
Top