![]() |
What is this code doing?
Application.StatusBar = "Calculating Year 1" Sheets("Assumptions").Range("G10") = 0 Do While Sheets("Financial Statements").Range("G70") Sheets("Assumptions").Range("G70") Sheets("Assumptions").Range("G10") Sheets("Assumptions").Range("G10") + 0.0005 Loo -- chalk ----------------------------------------------------------------------- chalky's Profile: http://www.excelforum.com/member.php...fo&userid=2375 View this thread: http://www.excelforum.com/showthread.php?threadid=56896 |
What is this code doing?
hello,
First of all "Application.StatusBar = "Calculating Year 1"" just sets the status bar to "calculating year 1". Then it defines G10 on your Assumptions sheet to 0. the loop is just going comparing two different cells, G70 on Financial statements with G70 on Assumptions. As long as G70 on Assumptions is less than G70 on Financial Statements then G10 on Assumptions is incremented by 0.0005. This will continue until G70 on Assumptions is larger than the other cell (which unless something else changes will never happen (infinite loop) or will happen right away (if it's already larger)). That's about it, Cheers, Scott "chalky" wrote: Application.StatusBar = "Calculating Year 1" Sheets("Assumptions").Range("G10") = 0 Do While Sheets("Financial Statements").Range("G70") < Sheets("Assumptions").Range("G70") Sheets("Assumptions").Range("G10") = Sheets("Assumptions").Range("G10") + 0.0005 Loop -- chalky ------------------------------------------------------------------------ chalky's Profile: http://www.excelforum.com/member.php...o&userid=23758 View this thread: http://www.excelforum.com/showthread...hreadid=568962 |
What is this code doing?
Thats pretty much what i suspected - thanks for that! -- chalky ------------------------------------------------------------------------ chalky's Profile: http://www.excelforum.com/member.php...o&userid=23758 View this thread: http://www.excelforum.com/showthread...hreadid=568962 |
All times are GMT +1. The time now is 03:30 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com