ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Replace formula's in two columns with the value's with VBA (https://www.excelbanter.com/excel-programming/344262-replace-formulas-two-columns-values-vba.html)

Les Stout[_2_]

Replace formula's in two columns with the value's with VBA
 
Hi all, I have two columns that have formula's in and i need to replace
the formula's with the values. The page can be up to 60,000 rows long,
so the code need to be quick if possible.

Thanks in advance

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***

Chip Pearson

Replace formula's in two columns with the value's with VBA
 
Select the range of cells, and right click on the right border.
Keeping the right mouse button down, drag the region one column
to the right, then back to its original location. On the pop-up
menu that displays, select "Copy Here As Values Only".


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


"Les Stout" wrote in message
...
Hi all, I have two columns that have formula's in and i need to
replace
the formula's with the values. The page can be up to 60,000
rows long,
so the code need to be quick if possible.

Thanks in advance

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***




Dave Peterson

Replace formula's in two columns with the value's with VBA
 
copy|paste special values (for each column if they're not adjacent) should go
pretty fast.

Les Stout wrote:

Hi all, I have two columns that have formula's in and i need to replace
the formula's with the values. The page can be up to 60,000 rows long,
so the code need to be quick if possible.

Thanks in advance

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***


--

Dave Peterson

Tom Ogilvy

Replace formula's in two columns with the value's with VBA
 
in code

columns(10).copy
columns(10).PasteSpecial xlPasteValues

columns(14).copy
columns(14).PasteSpecial xlPasteValues

if they are adjacent

set rng = Columns(10).Resize(,2)
rng.copy
rng.Pastespecial xlPasteValues

--
Regards,
Tom Ogilvy


"Dave Peterson" wrote in message
...
copy|paste special values (for each column if they're not adjacent) should

go
pretty fast.

Les Stout wrote:

Hi all, I have two columns that have formula's in and i need to replace
the formula's with the values. The page can be up to 60,000 rows long,
so the code need to be quick if possible.

Thanks in advance

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***


--

Dave Peterson





All times are GMT +1. The time now is 10:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com