+ Reply to Thread
Results 1 to 3 of 3

What is this code doing?

  1. #1
    Registered User
    Join Date
    05-26-2005
    Posts
    56

    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
    Loop

  2. #2
    Scott
    Guest

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


  3. #3
    Registered User
    Join Date
    05-26-2005
    Posts
    56
    Thats pretty much what i suspected - thanks for that!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1