LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Simple macro, even simpler programmer!

I'm trying to paste the value of one calculated cell onto another that
just has a vlaue unitl they are essentially the same. The macro below
seems to only iterate once, whereas it usually take three or fout
iterations to get them close. So, clearly something is wrong. Please
help.

Thanks
Dean

Sub Iterate_On_Cost()

Dim Difference As Variant
Dim CalculatedCost As Variant
Dim HardCodedCostValue As Variant


Do
Range("CalculatedCost").Select
Selection.Copy
Range("HardCodedCostValue").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Difference = Abs(CalculatedCost - HardCodedCostValue)
Loop Until Difference < 0.001

End Sub


 
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
A simpler way veryeavy Excel Programming 4 January 23rd 09 03:31 AM
Simpler Macro Joe via OfficeKB.com Excel Programming 7 April 17th 07 08:09 PM
is there not a simpler way T.c.Goosen1977[_30_] Excel Programming 4 July 5th 06 08:52 AM
ot - Wanted: Excel Programmer Writers in RedmondWanted: Excel Programmer Writers in Redmond Gary Keramidas[_2_] Excel Programming 4 May 8th 06 01:48 PM
How to run a macro many times simpler? cyberdude[_2_] Excel Programming 3 August 7th 04 01:54 PM


All times are GMT +1. The time now is 11:44 PM.

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

About Us

"It's about Microsoft Excel"