More efficient method to copy-paste values in place?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a sheet that has about 40,000 rows and each row contains a formula in
column "W" (23). I need to convert the formula to values. My current code
follows:

ActiveSheet.UsedRange.Columns(23).Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues

Although the above works, I'm sure there is a more efficient method that
could be written in a single line of code. Can anyone help me out?

Thanks much in advance.
 
Use something like

With ActiveSheet.UsedRange.Columns(23)
.Value = .Value
End With


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

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

Back
Top