Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Converting a formula to its value

I am writing a program that updates a large excel workbook on a weekly
basis. There are a couple of worksheets that I copy in the current
weeks data and the remaining worksheets perform their calculations
based on the current data. Is there a way to convert the cells
containing formulas to their values, so that next week when I run the
program the previous weeks data will remain?

Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Converting a formula to its value

Copy it and paste special...+Values over itself

Like this

Sub KillFormulas()
Dim myRng As Range
Set myRng = Range("A1:H18")
With myRng
.Copy
.PasteSpecial xlPasteValues
End With
Application.CutCopyMode = False
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


wrote in message
ups.com...
I am writing a program that updates a large excel workbook on a weekly
basis. There are a couple of worksheets that I copy in the current
weeks data and the remaining worksheets perform their calculations
based on the current data. Is there a way to convert the cells
containing formulas to their values, so that next week when I run the
program the previous weeks data will remain?

Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Converting a formula to its value


try this:
if your formula are in cell F56 to F9

Sub Macro1()
Range("F6:F9").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False
Range("F6").Select
Application.CutCopyMode = False
End Sub


--
Herve_Rob
------------------------------------------------------------------------
Herve_Rob's Profile: http://www.excelforum.com/member.php...o&userid=35204
View this thread: http://www.excelforum.com/showthread...hreadid=549684

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
Converting formula into values Arup C[_2_] Excel Discussion (Misc queries) 2 July 15th 08 01:47 PM
Converting a Formula stored as String to real Formula BlueD Excel Worksheet Functions 3 January 14th 08 07:48 PM
Converting a formula to its value [email protected] Excel Worksheet Functions 4 June 7th 06 09:39 PM
Formula not converting Hammer1235 Excel Worksheet Functions 2 February 20th 06 05:39 PM
Converting an Excel formula to an Access query formula Adam Excel Discussion (Misc queries) 1 December 15th 04 03:38 AM


All times are GMT +1. The time now is 03:55 PM.

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"