View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jeff Roper[_2_] Jeff Roper[_2_] is offline
external usenet poster
 
Posts: 1
Default Simple beginner question


Ok, I think I am really close to figuring this one out. This actuall
cycles through, but does not stop at the equal values. I trie
rounding the numbers (that one is adjusting to the other to be equal)
but it still doesn't stop when they are equal.

Sub AddPercentage()

Dim Number1, Number2, Percent As Double
Number1 = Range("I16")
Number2 = Range("K16")
Range("L7").Value = 0.05


Do While Not Round(Number1, 2) = Round(Number2, 2)
Range("L7") = Range("L7") + 0.00001
Loop

End Sub


Is there a way to get this to work? It's nice to be able to make
macro actually do something. Thanks. :

--
Jeff Rope
-----------------------------------------------------------------------
Jeff Roper's Profile: http://www.excelforum.com/member.php...fo&userid=1629
View this thread: http://www.excelforum.com/showthread.php?threadid=27691