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: 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

 
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
Beginner Question Bernie Charts and Charting in Excel 0 February 13th 07 04:31 PM
Beginner question! Pat Excel Discussion (Misc queries) 3 August 7th 06 09:19 AM
Beginner VBA question light Excel Programming 0 November 10th 04 05:40 PM
Beginner VBA question light Excel Programming 1 November 10th 04 01:44 PM
Simple beginner question Jeff Roper Excel Programming 3 November 10th 04 01:20 PM


All times are GMT +1. The time now is 12:29 AM.

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"