Macro to change formula cells into values?

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,194
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi Everyone,

I want to know if there is a better way to convert a range of cells from formulas to values other then the copy paste value method I use at the moment,
Currently I use this in my macro

Code:
    Sheets("Dashboard WK").Range("C14:T33").Select
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False

But I'm thinking there must be a more correct way to do this,

the reason I ask is I've got loads of these type odes in my spreadsheet and it makes the macro run slow as its having to got to the sheet select the area copy and paste,

is there a better way to do this?

any ideas would help

thanks

Tony
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hi,

I would do it like this, it's faster because there's no selecting going on. You don't even need to activate the worksheet.


Code:
With Sheets("Dashboard WK").Range("C14:T33")
    .Value = .Value
End With
 
Upvote 0
Mike has a good ideal. Here is mine.
Code:
Sheets("Dashboard WK").Range("C14:T33").Value = Sheets("Dashboard WK").Range("C14:T33").Value
 
Upvote 0
Thank you very much,
Mike thats a great solution will help me a lot, now all I have to do is replace all the code with the new code :)
My Aswer is, thanks for your input good to know I can do it that weay as well
thank guys

Tony
 
Upvote 0

Forum statistics

Threads
1,213,489
Messages
6,113,953
Members
448,535
Latest member
alrossman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top