+ Reply to Thread
Results 1 to 3 of 3

Thread: I need help with a (apparently) very simple VBA script

  1. #1
    profbosco
    Guest

    I need help with a (apparently) very simple VBA script

    HI Excel Programmers!

    Here's my problem: I need to insert VBA code into an Excel Macro which
    will loop a command (excel's "calculate") until a certain cell
    (containing a sum) is greater than 1250. Here's the issue: the spread
    is so complicated that it requires 4-5 minutes of calculation (on a
    very fast machine). Here's what I need done:

    1.) calcualte cells (calc takes 4-5 minutes)
    2.) (after calculating cells) read the value of cell G3 (this is a
    formula result)
    3.) If the VALUE of cell G3 is greater than 1200, then stop and just
    sit there
    4.) if the VALUE of cell G3 is less than 1200, then calculate (loop)

    Here's what I've got so far (hey it's a start!)

    --------------------------------------------------------------

    Sub Macro7()
    '
    ' Macro7 Macro
    ' Macro recorded 6/3/2006 by *

    Calculate
    End Sub



    Many thanks to anyone who can help!!!
    -Frank Bosco


  2. #2
    profbosco
    Guest

    Re: I need help with a (apparently) very simple VBA script

    somethinglikeant:

    Beautiful!
    Thank you much. You are truly the master.

    Best,
    Frank Bosco
    www.frankbosco.com



    somethinglikeant wrote:
    > Does this work ???
    >
    > Sub CalculateTil1200()
    > Do Until [G3].Value > 1200
    > Calculate
    > Loop
    > End Sub
    >
    > somethinglikeant
    >
    >
    >
    >
    > profbosco wrote:
    > > HI Excel Programmers!
    > >
    > > Here's my problem: I need to insert VBA code into an Excel Macro which
    > > will loop a command (excel's "calculate") until a certain cell
    > > (containing a sum) is greater than 1250. Here's the issue: the spread
    > > is so complicated that it requires 4-5 minutes of calculation (on a
    > > very fast machine). Here's what I need done:
    > >
    > > 1.) calcualte cells (calc takes 4-5 minutes)
    > > 2.) (after calculating cells) read the value of cell G3 (this is a
    > > formula result)
    > > 3.) If the VALUE of cell G3 is greater than 1200, then stop and just
    > > sit there
    > > 4.) if the VALUE of cell G3 is less than 1200, then calculate (loop)
    > >
    > > Here's what I've got so far (hey it's a start!)
    > >
    > > --------------------------------------------------------------
    > >
    > > Sub Macro7()
    > > '
    > > ' Macro7 Macro
    > > ' Macro recorded 6/3/2006 by *
    > >
    > > Calculate
    > > End Sub
    > >
    > >
    > >
    > > Many thanks to anyone who can help!!!
    > > -Frank Bosco



  3. #3
    somethinglikeant
    Guest

    Re: I need help with a (apparently) very simple VBA script

    Does this work ???

    Sub CalculateTil1200()
    Do Until [G3].Value > 1200
    Calculate
    Loop
    End Sub

    somethinglikeant




    profbosco wrote:
    > HI Excel Programmers!
    >
    > Here's my problem: I need to insert VBA code into an Excel Macro which
    > will loop a command (excel's "calculate") until a certain cell
    > (containing a sum) is greater than 1250. Here's the issue: the spread
    > is so complicated that it requires 4-5 minutes of calculation (on a
    > very fast machine). Here's what I need done:
    >
    > 1.) calcualte cells (calc takes 4-5 minutes)
    > 2.) (after calculating cells) read the value of cell G3 (this is a
    > formula result)
    > 3.) If the VALUE of cell G3 is greater than 1200, then stop and just
    > sit there
    > 4.) if the VALUE of cell G3 is less than 1200, then calculate (loop)
    >
    > Here's what I've got so far (hey it's a start!)
    >
    > --------------------------------------------------------------
    >
    > Sub Macro7()
    > '
    > ' Macro7 Macro
    > ' Macro recorded 6/3/2006 by *
    >
    > Calculate
    > End Sub
    >
    >
    >
    > Many thanks to anyone who can help!!!
    > -Frank Bosco



+ 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.2.0