Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Replacing formulas with its value

I wanted to know if there was a macro that would replace all formulas in a
worksheet with their respective value only.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Replacing formulas with its value

Try:

Sub gsnu()
Dim r As Range
For Each r In ActiveSheet.UsedRange
If r.HasFormula Then
r.Value = r.Value
End If
Next
End Sub

--
Gary's Student


"Marcus A" wrote:

I wanted to know if there was a macro that would replace all formulas in a
worksheet with their respective value only.

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 79
Default Replacing formulas with its value

Try this:

Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
Application.CutCopyMode = False

Rodrigo Ferreira


"Marcus A" <Marcus escreveu na mensagem
...
I wanted to know if there was a macro that would replace all formulas in a
worksheet with their respective value only.

Thanks.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 846
Default Replacing formulas with its value

Something for you to think about
Select the entire worksheet - by left click the box to the left of the "A"
and above the number "1" - then copy - then paste special - values - don't
need a macro to do that.

"Marcus A" wrote:

I wanted to know if there was a macro that would replace all formulas in a
worksheet with their respective value only.

Thanks.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Replacing formulas with its value

Info only.

You don't need a macro to do this.

Just copy the range and editpaste specialvaluesOKEsc

If you want a macro, turn on the macro recorder while doing the above steps.

OR use the macro provided by Gary's student.


Gord Dibben MS Excel MVP

On Thu, 21 Sep 2006 08:12:02 -0700, Marcus A <Marcus
wrote:

I wanted to know if there was a macro that would replace all formulas in a
worksheet with their respective value only.

Thanks.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change column letters to correct ones in many formulas automatically? Dmitry Kopnichev Links and Linking in Excel 7 October 13th 05 09:52 PM
How to change column letters to correct ones in many formulas automatically? Dmitry Kopnichev Excel Worksheet Functions 7 October 13th 05 09:52 PM
how can i get formulas in excel to copy and paste? bman Excel Worksheet Functions 1 October 3rd 05 04:15 PM
How prevent formulas to get external references/path to current workbook? Gunnar Johansson Excel Worksheet Functions 1 August 15th 05 10:39 AM
calculating formulas for all workbooks in a folder Chad Excel Worksheet Functions 3 November 13th 04 05:22 PM


All times are GMT +1. The time now is 01:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"