Cleaning up code

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
 
J

Jacob Skaria

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
 
N

norie

Using PasteSpecial.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top